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


_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to