Mathcaptcha.plugin is a plugin that presents users with a mathematical captcha instead of FUDforum's default captcha challenge.
Contents |
None, this plugin can be uploaded and activated as-is on any forum (FUDforum 3.0.0 or higher).
If enables, users will see a mathcaptcha when trying to register or when posing anonymously (if enabled).
File mathcaptcha.plugin:
<?php
// Initialize plugin
plugin_add_hook('CAPTCHA', 'plugin_mathcaptcha');
// Implement a simple mathematical CAPTCHA
function plugin_mathcaptcha() {
$n1 = mt_rand(1,10);
$n2 = mt_rand(0,10);
$answer = $n1 + $n2;
return array('Please sum the two numbers: '.$n1.' + '.$n2, $answer);
}