Tag Archives: block

Setting expiry time to infinite by default in Mediawiki

If you follow a mediawiki powered wiki and have to block users who spam the wiki, this trick might save you precious seconds. When you go to http://www.example.com/wiki/Special:Blockip/xxx.xxx.xxx.xxx you get a form in which the expiry field is set to “other” by default, then you have to change into “infinite” (if this is what you like) and then to click “Block this user”.
It would save seconds to have the expiry field already set by default to “infinite”, but how we do it? The way I found is the following. Edit the file includes/SpecialBlockip.php and around line 101 insert $this->BlockExpiry = "infinite";. There could be a variable you can set in the config but I haven’t found it.
If you didn’t understand what I was writing, this is good! This means you don’t have to unspam a wiki! ;-)