|This extension is obsolete!
It has been replaced by Phalanx.
Release status: stable
|Implementation||User rights, Special page|
|Description||Adds a new special page for blocking, viewing and unblocking user names and IP addresses by given name, using regular expressions|
|Author(s)||Bartek Łapiński, Tomasz Klim, Piotr Molski, Adrian Wieczorek, Alexandre Emsenhuber, Jack Phoenix|
|Last version||1.2.1 (13th of March, 2009)|
|License||GNU General Public License 2.0 or later|
|Check usage and version matrix|
RegexBlock is an extension that adds special page with the interface for blocking, viewing and unblocking user names and IP addresses using regular expressions. It was originally written by Bartek Łapiński for Wikia.
- Copy the
/regexBlockfolder into the
- Create the 2 required tables (see schema.sql).
require_once("$IP/extensions/regexBlock/regexBlock.php");to your GlobalSettings.php file.
- Set $wgSharedDB to the name of a shared database of your choice (in GlobalSettings.php).
- Set $wgMainCacheType to 'CACHE_MEMCACHED' and $wgMemCachedServers. The latter could look like this: $wgMemCachedServers = array ("127.0.0.1:11000"); (for a memcached server running on IP 127.0.0.1 and port 11000).
- Go to
- Enter the IP address or the username to be blocked to the "IP address or username" field
- Enter an optional reason. If no reason is provided by the blocker, a generic reason will be shown to the blocked user.
- Select expiry time
- Select if you want to block the creation of new accounts and if the match needs to be exact or regex one
- Press "Block this user"
- $wgContactLink — displayed to regexblocked users in the regexblock-reason-* interface messages. The default value is Special:Contact, but you might want to customize it if ContactPage extension isn't installed on your wiki.
- $wgRegexBlockDatabase — set this to the database to use for blockedby and stats_blockedby tables. If you want to use the local database, set this to false. Otherwise you could set this to $wgSharedDB, for example.
To block all users except local ones (192.168.xx.xx): \b(25[0-5]|2[0-4][0-9]|?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|?(|[2-9])[0-9]?)\.(25[0-5]|2[0-4][0-9]|?[0-9][0-9]?)\b
Note for users using pre-1.2 version 
If you are upgrading from a pre-1.2 (r45428) version of regexBlock, you'll need to apply the patch-upgrade.sql patch against your database.
Licensing and downloads 
The software is provided as-is. Updates will be made according to the needs of Wikimedia wikis; or where critical vulnerabilities are discovered.