MediaWiki talk:Gadget-contribsrange.js

From Wikipedia, the free encyclopedia

Very nice Gadget. However, at german wikipedia we mostly need /17 up to /22, maybe there is some fast way (multiple requests for smaller ranges? bigger requests and postfiltering?). Regards, Codeispoetry (talk) 11:48, 26 March 2008 (UTC)

That would require rewriting the script to use ajax POST, as the GET request used in the <script> is limited to around 4000 characters (which just fits in a /25). The problem however quickly becomes mathmatical: 255.255.255.255/24 is 3986 characters (even though /24 uses ucuserpreifx, which can only be done meaningfully for /8, /16, /24):
ucuser=255.255.255.0|255.255.255.1|255.255.255.2 ... 255.255.255.255.
255.255.255.255/22 would be 15944 characters, 255.255.255.255/17 would be over half a meg... I don't think supporting down to /17 would be very good. --Splarka (rant) 07:22, 27 March 2008 (UTC)

[edit] Current problems (May 2008)

Per the copy from my userspace currently here, and with some modifications made to the API, there are some problems with this gadget.

  • Some optimizations of ApiQueryUserContributions.php means that it currently sorts by username first, instead of by date. So the first users found will fill up the specified limit before more users are found. Not really a good JS solution, waiting on a solution in the API (such as a dedicated CIDR function).
    • The optimizations have also broken pagination, there is not yet a solution to this.
  • /25 and /26 ranges may currently be broken, due to a hard-coded limit of 50 parameters (this module performs uneven CIDR ranges using a pipe separated list &ucuser=1.2.3.0|1.2.3.1 ... but the list limit is 50 (the sysop limit of 500 is not applicable, due to the callback method used)). Possibly this could be overcome by rewriting this as an ajax module, but hopefully a CIDR function will be made available.

Really, the best solution is to write in CIDR support into the Special:Contributions page server-side and do away with this gadget ^_^. Caveat emptor: As it is now it is not really useless, but results may be deceptive and not all inclusive. --Splarka (rant) 03:18, 11 May 2008 (UTC)