You are here

function image_captcha_help in CAPTCHA 5.3

Same name and namespace in other branches
  1. 8 image_captcha/image_captcha.module \image_captcha_help()
  2. 6.2 image_captcha/image_captcha.module \image_captcha_help()
  3. 6 image_captcha/image_captcha.module \image_captcha_help()
  4. 7 image_captcha/image_captcha.module \image_captcha_help()

Implementation of hook_help().

File

image_captcha/image_captcha.module, line 16
Implementation of image CAPTCHA for use with the CAPTCHA module

Code

function image_captcha_help($section) {
  switch ($section) {
    case 'admin/user/captcha/image_captcha':
      $output = '<p>' . t('The image CAPTCHA is a popular challenge where a random textual code is obfuscated in an image. The image is generated on the fly for each request, which is rather CPU intensive for the server. Be careful with the size and computation related settings.') . '</p>';
      if (in_array('Image', image_captcha_captcha('list'))) {
        $result = image_captcha_captcha('generate', 'Image');
        $img = $result['form']['captcha_image']['#value'];
        $output .= t('<p>Example image, generated with the current settings:</p>!img', array(
          '!img' => $img,
        ));
      }
      return $output;
  }
}