Slide 31
Slide 31 text
/**
* Implementation of hook_captcha().
*/
function AMAZINGMY_captcha_captcha($op, $captcha_type='') {
switch ($op) {
case 'list':
return array('AMAZINGMY CAPTCHA');
case 'generate':
if ($captcha_type == 'AMAZINGMY CAPTCHA') {
$captcha = array();
$captcha['solution'] = 'AMAZINGMY';
$captcha['form']['captcha_response'] = array(
'#type' => 'textfield',
'#title' => t('Enter "Amazing"'),
'#required' => TRUE,
);
return $captcha;
module_invoke('AMAZINGMY_captcha', 'captcha',
'generate', $captcha_type_challenge);