Extension:SpamRegex

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
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+
Database changes yes
License GNU General Public License 2.0 or later
Download
README
Added rights

spamregex

Hooks used
EditFilter

AbortMove

Check usage and version matrix; stats

SpamRegex extension creates a new page, Special:SpamRegex, to filter out unwanted links or text. A full list of currently blocked links or text can be viewed on this same special page. The spamregexed expressions cannot be used in page content, edit summaries or move summaries, depending on what was chosen by the user who blocked links or text.

Contents

Installation[edit]

  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.

If administrators or bureaucrats cannot access the extension, check if relogin helps. If not, please check if the administrators and bureaucrats permissions are not overwritten after the initialization of the extension. If which case, the permissions should be appended (the extension adds one new permission right).

SQL query to create the table[edit]

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`)
);

Usage[edit]

  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

See also[edit]