reCAPTCHA web service to protect email addresses.', array('@url' => url('http://www.recaptcha.net'))); break; case 'admin/help#recaptcha': $output .= '
'. t('Uses the reCAPTCHA web service to protect email addresses. For more information on what reCAPTCHA Mailhide is, visit the official website.', array('@url' => url('http://mailhide.recaptcha.net'))) . '
'. t('Head over to the input format settings and add the reCAPTCHA Mailhide input filter to hide posted emails.', array('@inputformats' => url('admin/settings/filters'), '@url' => url('http://mailhide.recaptcha.net'))) . '
'; break; } return $output; } // function recaptcha_mailhide_help /** * reCAPTCHA implementation of hook_filter */ function recaptcha_mailhide_filter($op, $delta = 0, $format = -1, $text = '') { switch ($op) { case 'list': return array(0 => t('reCAPTCHA Mailhide')); case 'description': return recaptcha_mailhide_filter_tips($delta, $format); case 'settings': require_once('recaptcha.inc'); @(include_once('recaptcha/recaptchalib.php')) or _recaptcha_library_not_found(); $form['filter_recaptcha'] = array('#type' => 'fieldset', '#title' => t('reCAPTCHA Mailhide Keys'), '#collapsible' => TRUE, '#collapsed' => FALSE); $form['filter_recaptcha']['recaptcha_mailhide_public_key'] = array( '#type' => 'textfield', '#title' => t('Public Key'), '#default_value' => variable_get('recaptcha_mailhide_public_key', ''), '#maxlength' => 50, '#description' => t('Your public Mailhide key obtained from reCAPTCHA.', array('@url' => 'http://mailhide.recaptcha.net/apikey')), ); $form['filter_recaptcha']['recaptcha_mailhide_private_key'] = array( '#type' => 'textfield', '#title' => t('Private Key'), '#default_value' => variable_get('recaptcha_mailhide_private_key', ''), '#maxlength' => 50, '#description' => t('Your private Mailhide key obtained from reCAPTCHA.', array('@url' => 'http://mailhide.recaptcha.net/apikey')), ); return $form; break; case 'process': require_once('recaptcha.inc'); global $_recaptcha_mailhide_public_key, $_recaptcha_mailhide_private_key, $_recaptcha_mailhide_nokey_warn; @(include_once('recaptcha/recaptchalib.php')) or _recaptcha_library_not_found(); $_recaptcha_mailhide_public_key = variable_get('recaptcha_mailhide_public_key', ''); $_recaptcha_mailhide_private_key = variable_get('recaptcha_mailhide_private_key', ''); $text = ' '. $text .' '; $text = preg_replace_callback("!(|