ConfirmEdit extension

From D3xt3r01.tk
Jump to navigationJump to search

WHY

Because I want people tu suffer ! :)) Well .. I just wanna block people making bots even if I allowed them to edit my wiki..

HOW

Get the extension and put it in the /extensions dir add to LocalSettings.php

require_once("extensions/ConfirmEdit/ConfirmEdit.php");
require_once("extensions/ConfirmEdit/FancyCaptcha.php");
$wgCaptchaTriggers['edit'] = true; // Would check on every edit
$wgCaptchaTriggers['create'] = true; // Check on page creation.
$wgCaptchaTriggers['addurl'] = true; // Check on edits that add URLs
$wgCaptchaTriggers['createaccount'] = true; // Check on account creation.
$wgCaptchaTriggers['badlogin'] = true; // Check after a failed log-in attempt.
$wgGroupPermissions['sysop']['skipcaptcha'] = true;

edit extensions/ConfirmEdit/ConfirmEdit.php and change

$wgCaptchaClass = 'SimpleCaptcha';

to

$wgCaptchaClass = 'FancyCaptcha';

in extensions/ConfirmEdit/FancyCaptcha.php change from

$wgCaptchaSecret = 'CHANGE_THIS_SECRET';
$wgCaptchaDirectory = "$wgUploadDirectory/captcha";

to

$wgCaptchaSecret = 'NEW_SECRET_OR_SOMETHING';
$wgCaptchaDirectory = "/path/to/captcha/images/dir";

now .. you'll need python .. and the words package .. and the imaging library for python .. assuming that you are in extensions/ConfirmEdit this is an example

python captcha.py --font=/usr/share/fonts/truetype/freefont/FreeSans.ttf --wordlist=/usr/share/dict/words --key=FOO --output=../../captcha --count=100

LINKS

http://www.mediawiki.org/wiki/Extension:ConfirmEdit