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|
|Latest version||1.4 (4 December 2016)|
|License||GNU General Public License 2.0 or later|
Translate the RegexBlock extension if it is available at translatewiki.net
|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.
- Download and place the file(s) in a directory called
- Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'RegexBlock' );
- Run the update script which will automatically create the necessary database tables that this extension needs.
- Ensure that the
regexblockuser right is given to a group that exists; by default this user right is given to the
staffuser group (which does not exist in a default MediaWiki installation).
- Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
|User right name||Group which is given this right by default||Description|
||staff||User right required to view and thus use Special:RegexBlock for managing blocks.|
||staff||Users who have this right are exempt from RegexBlock blocks.|
- 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"
|Configuration variable name||Default value||Description|
||Displayed to regexblocked users in the regexblock-reason-* interface messages. You might want to customize it if the ContactPage extension isn't installed on your wiki.|
||Set this to the database to use for
To block all users except local ones (192.168.xx.xx):
- Extension:SpamRegex — a similar extension for blocking expressions in page content (etc.) using regular expressions