Implement recaptcha in override of com_content\form - Joomla! Forum - community, help and support


hi

i want override , implement recaptcha create article form located in components\com_content\views\form\tmpl\
i have copied edit.php , edit.xml files templates\my_template\html\com_content\form\ , when make changes works.

i'm not able implement joomla 2.5 recaptcha plugin feature. have tried add fields edit.xml file in components\com_users\models\forms\registration.xml nothing happening because needs added edit.php file.

has idea how implement recaptcha?

i have found partial sollution here
http://stackoverflow.com/questions/12840015/how-to-use-joomla-recaptcha-plugin-to-my-custom-module?rq=1

it explains how add recaptcha module , first part of code renders recaptcha:

code: select all

//php code
jpluginhelper::importplugin('captcha');
$dispatcher = jdispatcher::getinstance();
$dispatcher->trigger('oninit','dynamic_recaptcha_1');

//html code inside form tag
<div id="dynamic_recaptcha_1"></div>


the second part not validate recaptcha because edit.php file uses javascript post , have no idea put code validate recaptcha. can help?

code: select all

$post = jrequest::get('post');     
jpluginhelper::importplugin('captcha');
$dispatcher = jdispatcher::getinstance();
$res = $dispatcher->trigger('oncheckanswer',$post['recaptcha_response_field']);
if(!$res[0]){
    die('invalid captcha');
}





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support