You are here

function image_captcha_settings_form_pre_render in CAPTCHA 5.3

Same name and namespace in other branches
  1. 6 image_captcha/image_captcha.admin.inc \image_captcha_settings_form_pre_render()

Pre render function for image_captcha_settings_form

1 string reference to 'image_captcha_settings_form_pre_render'
_image_captcha_settings_form in image_captcha/image_captcha.admin.inc
Helper function for the configuration form for image_captcha Called by image_captcha_settings_form() (which determines the real form_id 'image_captcha_settings_form')

File

image_captcha/image_captcha.admin.inc, line 205
Implementation of the administration UI of the image CAPTCHA module.

Code

function image_captcha_settings_form_pre_render($form_id, $form) {
  if (count($form['image_captcha_font_settings']['image_captcha_font']['#options']) == 1) {
    drupal_set_message(t('The image CAPTCHA module works best with a TrueType font file (TTF) for generating the images, but because of licencing issues it is not allowed to package fonts with the module. A simple built-in bitmap font is provided as default instead. You can install TrueType fonts yourself by putting them in the fonts directory of the image CAPTCHA module (directory "%fontsdir") or by uploading them to your Drupal file system (directory "%filesdir") with for example the upload module.', array(
      '%fontsdir' => drupal_get_path('module', 'image_captcha') . '/fonts',
      '%filesdir' => file_directory_path(),
    )), 'warning');
  }
  if ($form['image_captcha_font_settings']['image_captcha_font']['#default_value'] == 'BUILTIN') {
    drupal_set_message(t('The usage of the built-in bitmap font it is not recommended because of its small size and missing UTF-8 support.'), 'warning');
  }
}