Extension:SpamRegex

From MediaWiki.org

Jump to: navigation, search

               

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
SpamRegex

Release status: stable

Special.spamregex.png
Implementation  Special page
Description Adds a special page to filter out unwanted expressions.
Author(s)  Bartek Łapiński
Last Version  1.2 (3rd of October, 2008)
MediaWiki  1.12+
License GNU General Public License 2.0 or later
Download Download snapshot

Subversion [Help]
Browse source code

README

check usage (experimental)

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.

Contents

[edit] Installation

  1. Copy the SpamRegex folder and its contents into $IP/extensions/.
  2. Create the spam_regex table with the SQL query below or run SpamRegex.sql against your wiki's database from command line.
  3. Include the SpamRegex.php in LocalSettings.php/GlobalSettings.php.
  4. 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

  1. Go to Special:SpamRegex
  2. Enter the phrase to be blocked into the "Phrase to block" box
  3. Select one or both of the available options: block phrase in page text & block phrase in summary (edit summaries)
  4. Press the "Block this phrase" button

[edit] See also