• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with captcha

I have a comments module and I want to add captcha to the comment form. I've seen a lot of examples but cant seem to get how to do it...

Could I pls get help with the correct codes to add to the comments_view, comments_model and comments_controller file to get the captcha to work. A solution will b well appreciated.

If you download the recaptcha here: https://developers.google.com/recaptcha/docs/php

You can add the recaptcha library as a helper. Rename it to recaptchalib_helper.php and put it in your helper folder.

Edit the recaptcha function with the pub key (which you need to request here - https://www.google.com/recaptcha/admin/create):

function recaptcha_get_html ($pubkey = '{put your key in here}', $error = null, $use_ssl = false)

From there you just need to add:
echo recaptcha_get_html();

where you want the captcha displayed.

  var RecaptchaOptions = {
   theme : 'clean'
  //javascript end
        <label class="ipsField_title" for="display_name">
        <p class="ipsField_content">
            &lt;?php echo recaptcha_get_html(); ?&gt;

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.