Extension:VisualMathCaptcha

VisualMathCaptcha extension gives your wiki a moderately strong captcha with a math operation generated as image.

Installation
This extension requires you have GD module for PHP.

Download VisualMathExtension from here (this is not a direct link; extension can't be located by clicking this link).

To install this extension, add the following to LocalSettings.php:

Configuration parameters

 * $wgVisualMathCaptchaItemMax : [int] max value (included) for each number in operation ; Defaulted to 9. Needs to be increased as a trivial single-digit challenge will let 10% of the spam through.


 * $wgVisualMathCaptchaItemNum : [int] count of number in generated operator; Defaulted to 2.


 * $wgVisualMathCaptchaOperators : [array] operators allowed for generation; Defaulted to { '+', '-' }.

To adjust the minimum/maximum brightness of both the text characters and the random background, one must edit VisualMathCaptcha.body.php as these are not assigned parameters. The $bgCol = imagecolorallocate(...) and $txtCol = imagecolorallocate(...)</tt> lines control background and text colour, respectively.

The last three parameters of each contain a random function for brightness, where each controls one primary colour. The maximum range of each must be within 0 to 255, so (for example) rand(0,255)</tt> would allow any random intensity, rand(0,127)</tt> would be between black and grey,  rand(128,255)</tt> between grey and white.

Adjust the foreground and background intensity to the lowest contrast which is still human-readable.

With ConfirmEdit
This captcha can be used instead of standard captcha of ConfirmEdit extension. To do so :
 * 1) Open ConfirmEdit.php</tt>, in ConfirmEdit extension directory, and change $wgCaptchaClass</tt> value to VisualMathConfirmCaptcha</tt>.
 * 2) Add following line in LocalSettings.php, after content copied from provided file LocalSettings.part</tt> :

With Lockdown extension
VisualMathCaptcha uses a special page: SpecialPage:VisualMathCaptcha.

Add in LocalSettings.php

With CorporateContact

 * VisualMathCaptcha can be used with CorporateContact.