set_prefilter('picture', '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) { if ($conf['cryptographp']['comments_action'] == 'reject') array_push($page['errors'], l10n('Invalid Captcha')); return ($action != 'reject') ? $conf['cryptographp']['comments_action'] : 'reject'; } return $action; } ?>