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

'; return str_replace($search, $search."\n{\$CRYPTO.parsed_content}", $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') $page['errors'][] = l10n('Invalid Captcha'); return ($action != 'reject') ? $conf['cryptographp']['comments_action'] : 'reject'; } return $action; }