Extension:SpamRegex
From MediaWiki.org
|
SpamRegex Release status: stable |
|
|---|---|
| Implementation | Special page |
| Description | Adds a special page to filter out unwanted expressions. |
| Author(s) | Bartek Łapiński |
| Last Version | 1.0 (26th of July, 2008) |
| MediaWiki | 1.11+ |
| License | No license specified |
| Download | SimplifiedRegex (needed) SpamRegex |
| Added rights | spamregex |
| Hooks used | EditFilter |
SpamRegex extension adds a special page, Special:SpamRegex, to filter out unwanted expressions. The spamregexed expressions cannot be used in page content, edit summaries or move summaries, depending on what was chosen by the user who blocked an expression. A full list of currently blocked expressions can be viewed at the same special page.
[edit] Installation
- Create the
spam_regextable with the SQL query below. - Copy the
/SpamRegexfolder and its contents into$IP/extensions. - If not already supplied with RegexBlock extension, copy
SimplifiedRegex.phpinto$IP/extensions/SimplifiedRegex/. - Include the
SpamRegex.phpin GlobalSettings.php. - This extension uses Memcached - please check if Memcached is configured properly in Global/LocalSettings.php.
That should do the trick. If people belonging to staff cannot access the extension, check if relogin helps. If not, please check if the staff permissions are not overwritten after the initialization of the extension. If that is the case, the permissions should be rather appended (the extension adds one new permission right).
[edit] SQL query to create the table
CREATE TABLE `spam_regex` ( `spam_id` int(5) NOT NULL AUTO_INCREMENT, `spam_text` varchar(255) NOT NULL, `spam_timestamp` char(14) NOT NULL, `spam_user` varchar(255) NOT NULL, `spam_textbox` int(1) NOT NULL DEFAULT 1, `spam_summary` int(1) NOT NULL DEFAULT 0, PRIMARY KEY (`spam_id`), UNIQUE KEY `spam_text` (`spam_text`), KEY `spam_timestamp` (`spam_timestamp`), KEY `spam_user` (`spam_user`) );
[edit] Usage
- Go to Special:SpamRegex
- Enter the phrase to be blocked into the "Phrase to block" box
- Select one or both of the available options: block phrase in page text & block phrase in summary (edit summaries)
- Press the "Block this phrase" button

