[pmwiki-users] Turing Test for pmwiki
Patrick R. Michaud
pmichaud at pobox.com
Sun Jul 13 23:55:09 CDT 2008
On Sun, Jul 13, 2008 at 08:38:04PM -0500, Patrick R. Michaud wrote:
> I've set up an example at http://www.pmwiki.org/wiki/Test/TuringCaptcha .
> The local customization I used to do this is:
I've gone ahead and updated the Captcha recipe to make this
slightly simpler. The new local customization is:
$CaptchasList = array(
'What day comes after Monday?' => 'Tuesday',
'What color is a green apple?' => 'green',
'What is larger, an elephant or an ant?' => 'elephant',
'What shape is a circle? It is ro...' => 'round',
);
$CaptchaChallenge = array_rand($CaptchasList);
$CaptchaValue = $CaptchasList[$CaptchaChallenge];
include_once('cookbook/captcha.php');
Now all one has to do is set $CaptchaChallenge to whatever
should be displayed as part of the {$Captcha} page variable
(in the form), and $CaptchaValue to the matching response.
The default is still to create an image from $CaptchaValue
if possible, and $CaptchaValue still defaults to a random
number between 1000 and 9999.
Hope this helps!
Pm
More information about the pmwiki-users
mailing list