MediaWiki SPAM Control Kit

From DanBP.org
Jump to: navigation, search

Recommended settings and extensions

Put the lines above at the end of the LocalSettings.php file after have installed the respective extensions.

#
#
# MediaWIKI SPAM Control Kit 1.0 (7/8/2010)
# LocalSettings.php optimal config file
#
# Tested on MediaWiki 1.16
# By Daniel Brooke Peig http://www.danbp.org
#
# Stop SPAM in your MediaWiki website
# These settings should work without altering default user permissions (anyone can edit).
#
#
# 
# Edit level SPAM blocking (you can use all of them at the same time)
#  - DNSBlacklist - Built-in function. Blocks edit from open proxies.
#  - Simple AntiSpam - Invisible robot protection. Works well with Recaptcha. Get it here: http://www.mediawiki.org/wiki/Extension:SimpleAntiSpam
#  - Recaptcha - Extension: Requires user authenticantion by Google RECAPTCHA. Get it here: http://www.mediawiki.org/wiki/Extension:ReCAPTCHA
#  - SpamBlack List - Extension: Blocks URL added into pages based on a word database. Don't forget to configure the word list. Get it here: http://www.mediawiki.org/wiki/Extension:SpamBlacklist
#  - TitleBlack List - Extension: Blocks title of pages based on a word database. Don't forget to configure the word list. Get it here: http://www.mediawiki.org/wiki/Extension:TitleBlacklist
#
# Access level SPAM blocking (chose one of them) - Beware! access from free proxy servers will be blocked.
#  - BadBehavior - Extension: Blocks access from unknown browsers and users listed at internet blacklists. Often updated. Get it here: http://www.bad-behavior.ioerror.us
#
#
#

//Built in Antispam System
$wgEnableDnsBlacklist  = true;
$wgDnsBlacklistUrls  = 	array("http.dnsbl.sorbs.net.","opm.tornevall.org.");

//Simple Anti-SPAM
require_once("$IP/extensions/SimpleAntiSpam/SimpleAntiSpam.php");
 
//Recaptcha - A Better Captcha Tool
require_once( "$IP/extensions/recaptcha/ReCaptcha.php" );
// Sign up for these at https://www.google.com/recaptcha/admin/create
$recaptcha_public_key = 'your-key-here'; //Your recaptcha public key	
$recaptcha_private_key = 'your-key-here'; //Your recaptcha private key
//When to ask for a captcha
$wgGroupPermissions['*'            ]['skipcaptcha'] = false;
$wgGroupPermissions['user'         ]['skipcaptcha'] = false;
$wgGroupPermissions['autoconfirmed']['skipcaptcha'] = false;
$wgGroupPermissions['bot'          ]['skipcaptcha'] = true; // registered bots
$wgGroupPermissions['sysop'        ]['skipcaptcha'] = true; //Only sysop doesn't need to pass thru captcha test
//What events should be protected
$wgCaptchaTriggers['edit']          = true;
$wgCaptchaTriggers['create']        = true;
$wgCaptchaTriggers['addurl']        = true;  // Check on edits that add URLs
$wgCaptchaTriggers['createaccount'] = true;

//Spam BlackList
require_once( "$IP/extensions/SpamBlacklist/SpamBlacklist.php" );

//Title BlackList
require_once( "$IP/extensions/TitleBlacklist/TitleBlacklist.php" );

//BadBehaviour
include_once( 'includes/DatabaseFunctions.php' );
include( './extensions/bad-behavior/bad-behavior-mediawiki.php' );

#
#
# End of the SPAM Control Kit
#
Views
Personal tools
ersatz