Help with captcha |
[eluser]Unknown[/eluser]
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.
[eluser]Unknown[/eluser]
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): Code: function recaptcha_get_html ($pubkey = '{put your key in here}', $error = null, $use_ssl = false) From there you just need to add: Code: echo recaptcha_get_html(); where you want the captcha displayed. EX: Code: //javascriptopen |
Welcome Guest, Not a member yet? Register Sign In |