Page 1 of 1

Как вставить капчу в модуль Acomments ?

Posted: Thu Oct 04, 2012 5:05 am
by proton
Подскажите как вставить капчу в модуль комментариев Acomments ?
В файле action.default.php (Acomments) вроде прописано, что при существующем модуле Captcha он должен выведен в AComments,но он не появляется .

Code: Select all

// captcha spam protection
if ($spamprotect) {
	if (isset($this->cms->modules['Captcha'])) {
		$captcha = &$this->getModuleInstance('Captcha');
		// $smarty->assign('captcha_title', $this->Lang('captcha_title'));
$smarty->assign('spamprotectimage',$captcha->getCaptcha());                            }
Или это не то.Добавлял еще

Code: Select all

echo $captcha->getCaptcha(); // show the captcha image
но эффекта нет.

Re: Как вставить капчу в модуль Acomments ?

Posted: Wed Mar 05, 2014 1:27 pm
by tiburon
Нужно исправит action.default.php модуля AComments

AComments checks if Captcha-Module is enabled with:

if(isset($this->cms->modules['Captcha'])){

this doesn't work anymore in CMSMS Hyacinthe.

bad workaround would be:

if(true || isset($this->cms->modules['Captcha'])){

http://dev.cmsmadesimple.org/bug/view/7560