set_prefilter('index', 'prefilter_crypto'); } function prefilter_crypto($content, $smarty) { global $conf; $search = '{$comment_add.CONTENT}

'; $replace = $search.'

CAPTCHA Image

'; return str_replace($search, $replace, $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) { array_push($page['errors'], l10n('Invalid Captcha')); return 'reject'; } return $action; } ?>