set_prefilter('guestbook', 'prefilter_crypto'); } function prefilter_crypto($content, $smarty) { $search = '{$comment_add.CONTENT}'; return str_replace($search, $search."\n{\$CRYPTOGRAPHP}", $content); } function check_crypto($action, $comment) { global $conf, $page; include_once(CRYPTO_PATH.'securimage/securimage.php'); $securimage = new Securimage(); if (!is_a_guest()) return $action; if ($securimage->check($_POST['captcha_code']) == false) { $page['errors'][] = l10n('Invalid Captcha'); return 'reject'; } return $action; }