set_prefilter('register', 'captcha_prefilter'); $template->assign('CAPTCHA', dsp_crypt($conf['cryptographp_theme'][0].'.cfg.php',1)); } function captcha_prefilter($content, $smarty) { load_language('plugin.lang', CRYPTO_PATH); $search = '

'; $replace = '

{\'Antibot test\'|@translate}
' ."\n".$search; return str_replace($search, $replace, $content); } function check_captcha($errors) { if (!chk_crypt($_POST['code'])) { load_language('plugin.lang', CRYPTO_PATH); array_push($errors, l10n('Invalid Captcha')); } return $errors; } ?>