function recaptcha_admin_settings in reCAPTCHA 5.2
Same name and namespace in other branches
- 6.2 recaptcha.admin.inc \recaptcha_admin_settings()
- 6 recaptcha.admin.inc \recaptcha_admin_settings()
- 7.2 recaptcha.admin.inc \recaptcha_admin_settings()
- 7 recaptcha.admin.inc \recaptcha_admin_settings()
Implementation of admin settings().
1 string reference to 'recaptcha_admin_settings'
- recaptcha_menu in ./
recaptcha.module - Implementation of hook_menu().
File
- ./
recaptcha.module, line 66 - Uses the reCAPTCHA web service to improve the CAPTCHA system.
Code
function recaptcha_admin_settings() {
require_once 'recaptcha.inc';
@(include_once 'recaptcha/recaptchalib.php') or _recaptcha_library_not_found();
$form = array();
$form['recaptcha_public_key'] = array(
'#type' => 'textfield',
'#title' => t('Public Key'),
'#default_value' => variable_get('recaptcha_public_key', ''),
'#maxlength' => 40,
'#description' => t('The public key given to you when you <a href="@url" target="_blank">registered at google.com</a>.', array(
'@url' => url(recaptcha_get_signup_url($_SERVER['SERVER_NAME'], variable_get('site_name', ''))),
)),
'#required' => TRUE,
);
$form['recaptcha_private_key'] = array(
'#type' => 'textfield',
'#title' => t('Private Key'),
'#default_value' => variable_get('recaptcha_private_key', ''),
'#maxlength' => 40,
'#description' => t('The private key given to you when you <a href="@url" target="_blank">registered at google.com</a>.', array(
'@url' => url(recaptcha_get_signup_url($_SERVER['SERVER_NAME'], variable_get('site_name', ''))),
)),
'#required' => TRUE,
);
$form['recaptcha_secure_connection'] = array(
'#type' => 'checkbox',
'#title' => t('Secure Connection'),
'#default_value' => variable_get('recaptcha_secure_connection', FALSE),
'#description' => t('Connect to the reCAPTCHA server using a secure connection.'),
);
$form['recaptcha_theme_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Theme Settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['recaptcha_theme_settings']['recaptcha_theme'] = array(
'#type' => 'select',
'#title' => t('Theme'),
'#description' => t('Defines which theme to use for reCAPTCHA.'),
'#options' => array(
'red' => t('Red'),
'white' => t('White'),
'blackglass' => t('Black Glass'),
'clean' => t('Clean'),
'custom' => t('Custom'),
),
'#default_value' => variable_get('recaptcha_theme', 'red'),
'#required' => TRUE,
);
$form['recaptcha_theme_settings']['recaptcha_tabindex'] = array(
'#type' => 'textfield',
'#title' => t('Tab Index'),
'#description' => t('Sets a <a href="@tabindex" target="_blank">tabindex</a> for the reCAPTCHA text box. If other elements in the form use a tabindex, this should be set so that navigation is easier for the user.', array(
'@tabindex' => 'http://www.w3.org/TR/html4/interact/forms.html#adef-tabindex',
)),
'#default_value' => variable_get('recaptcha_tabindex', ''),
'#size' => 4,
);
return system_settings_form($form);
}