You are here

function image_captcha_settings_form_pre_render in CAPTCHA 6

Same name and namespace in other branches
  1. 5.3 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
Configuration form for image_captcha

File

image_captcha/image_captcha.admin.inc, line 191

Code

function image_captcha_settings_form_pre_render($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');
  }
  return $form;
}