Это решение помогло
http://expressionengine.com/forums/viewthread/61352/
After spending some quality time with the code, I was able to hack the mod.weblog_standalone.php file to include captcha processing on the specific weblog I needed.
Here’s what you do (v 1.6.0):
Cut lines 803-830 (the “Check Captcha” code) from /system/modules/email/mod.email.php. Drop this into mod.weblog_standalone.php at line 62. Add “global $DB” to the top, plus a check for the weblog_id in question.
With a little context above and below, your mod.weblog_standalone.php file should now look like this:
// Ya gotta be logged-in billy bob...
if ($SESS->userdata('member_id') == 0)
{
return $OUT->show_user_error('general', $LANG->line('weblog_must_be_logged_in'));
}
/** ----------------------------------------
/** Check Captcha
/** ----------------------------------------*/
global $DB; # <-- ADD THIS
if ($_POST['weblog_id'] == 11) # <-- ADD WEBLOG_ID WHERE YOU WANT CAPTCHAS ENABLED
{
if ( ! isset($_POST['captcha']) || $_POST['captcha'] == '')
{
return $OUT->show_user_error('general', array($LANG->line('captcha_required')));
}
$query = $DB->query("SELECT COUNT(*) AS count FROM exp_captcha
WHERE word='".$DB->escape_str($_POST['captcha'])."'
AND ip_address = '".$IN->IP."'
AND date > UNIX_TIMESTAMP()-7200");
if ($query->row['count'] == 0)
{
return $OUT->show_user_error('submission', array($LANG->line('captcha_incorrect')));
}
$DB->query("DELETE FROM exp_captcha
WHERE (word='".$DB->escape_str($_POST['captcha'])."'
AND ip_address = '".$IN->IP."')
OR date < UNIX_TIMESTAMP()-7200");
}
/** ----------------------------------------
/** Prep data for insertion
/** ----------------------------------------*/
This hack assumes the weblog_id is hard-coded into the entry form.
Good luck.
1. Обратите внимание, что здесь
if ($_POST['weblog_id'] == 11)
там, где 11 должен быть номер веблога
2. В настройках Admin › System Preferences › Captcha Preferences
Поставьте Require captcha with logged-in members? Yes