Author Topic: ReCaptcha code in com_user  (Read 10975 times)

0 Members and 1 Guest are viewing this topic.

Offline sharky_46

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
ReCaptcha code in com_user
« on: September 23, 2009, 07:54:32 AM »
Hi, thanks for your plug-in.
Is it possible, because I am beginner to joomla 1.5.14, to show me the exact code to insert into com_user to display and verifiy captcha members registration?
I know it's something like "Global mainframe"? But where exactly to insert it, what code line and what folder? Could you give me a small tutorial or help me with this please ? Why you don't use Recaptcha on your website ?
Thanks
« Last Edit: September 23, 2009, 07:57:09 AM by sharky_46 »

Offline BDD

  • Global Moderator
  • Full Member
  • *****
  • Posts: 146
  • Karma: +0/-0
    • View Profile
Re: ReCaptcha code in com_user
« Reply #1 on: September 23, 2009, 09:58:45 AM »
First, look at your template directory joomla-directory/templates/your-default-template/html to see if it override the com_user's HTML output.

If you see the file com_user/registration/default.php inside above directory then please open that file with a text editor. Otherwise, open the file joomla-directory/components/com_user/views/register/tmpl/default.php.

In the text editor window / view port, look for something similar to:

Code: [Select]
<button class="button validate" type="submit"><?php echo JText::_('Register'); ?></button>

Right before the line of code above, add following block of code:

Code: [Select]
<?php
global $mainframe;
$mainframe->triggerEvent('onCaptchaDisplay');
?>


Now, login to your Joomla administration panel and navigate to Extensions -> Plugin Manager -> System - JEZ reCAPTCHA Integrator then configure JEZ reCAPTCHA Integrator plugin as following:

Code: [Select]
Enabled: Yes
reCAPTCHA Public Key: your public key
reCAPTCHA Private Key: your private key
Inclusion Syntax: No
Auto-verify: Yes

That's all. Hope this help.

Offline sharky_46

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: ReCaptcha code in com_user
« Reply #2 on: September 23, 2009, 11:54:02 AM »
Thanks a lot, it was exactly what I was looking for, the details was perfect. It took me 3 days to have a captcha on my website, because in France joomla Community is very poor to help someone !
I see that it's different here and it makes me happy ;)
I posted since 2 days at joomla.fr forum and still have no response !!!!
Thanks again for your great plug-in and your great support !
Keep up the good work ;)
I am going to vote for your plug-in and support on www.extensions.joomla.org

See you soon
 :o ;D

Offline sharky_46

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: ReCaptcha code in com_user
« Reply #3 on: September 23, 2009, 11:57:07 AM »
I forget a thing, more exactly a question,
what is the captcha you use here at JoomlaEZ ? I think it's beautiful, is it a custom captcha from you or other ?
If it's another captcha, where can I find it please ?
Thanks again ;)

Offline BDD

  • Global Moderator
  • Full Member
  • *****
  • Posts: 146
  • Karma: +0/-0
    • View Profile
Re: ReCaptcha code in com_user
« Reply #4 on: September 23, 2009, 12:31:01 PM »
Hello,

We only use our reCAPTCHA Joomla Integrator plugin in our Joomla site at www.joomlaez.com.

The captcha used here, community.joomlaez.com, is the build-in captcha feature of SMF forum software.

Offline truong_an_2009

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: ReCaptcha code in com_user
« Reply #5 on: October 28, 2009, 12:12:24 AM »
Hi all,

First time i used this plugin i tried to got it to working but no success after i read this topic and i make it to success  ;D very nice. it can embed anywhere as register form virtuemart. However, when i did not enter to verify code me did not see any notice to users know them don't enter to verify or not match code but still OK bcs it don't change other page if users don't verify. i hope team can fix this. great plugin.

For a question, if i enable Auto-verify function of plugin. This way could apply to all of pages and can be slowly my site ?

Thank you for Great Plugin
Thank you very much.

Offline intown

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: ReCaptcha code in com_user
« Reply #6 on: March 10, 2010, 09:44:08 AM »
Thanks for this great plugin, I was able to get it working and had a few questions.

1. I created my own template override directory.  In the post above it was mentioned that the path should be:
/templates/your-default-template/html/com_user/registration/default.php
I think the path should be:
/templates/your-default-template/html/com_user/register/default.php
(register instead of registration)
Which path is correct?

2. When the passwords do not match I get "500 - Passwords do not match" error.  I think this is a core joomla problem. 
Are you familiar with this error? 
What are you using for registration on www.joomlaez.com?  This page worked very nicely.

Thanks!

Offline intown

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: ReCaptcha code in com_user
« Reply #7 on: March 10, 2010, 09:56:47 AM »
sorry for the quick follow up post.

When I turn on the autoverify, and type in mismatched passwords I no longer get the error 500 as before, which is good.

However the screen just refreshes and all of the data entered in is lost.

How do I get it to work like on your main site where the boxes are higlighted red for errors  and the filled in data is not lost.

Thanks!

Offline BDD

  • Global Moderator
  • Full Member
  • *****
  • Posts: 146
  • Karma: +0/-0
    • View Profile
Re: ReCaptcha code in com_user
« Reply #8 on: March 10, 2010, 08:44:45 PM »
1. I created my own template override directory.  In the post above it was mentioned that the path should be:
/templates/your-default-template/html/com_user/registration/default.php
I think the path should be:
/templates/your-default-template/html/com_user/register/default.php
(register instead of registration)
Which path is correct?

The correct path is /templates/your-default-template/html/com_user/register/default.php. I am sorry for mistyping it in my previous post.

How do I get it to work like on your main site where the boxes are higlighted red for errors  and the filled in data is not lost.

You need to override the default Joomla registration view in your default template. I attached our override file here so you can learn the trick from.

Offline intown

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: ReCaptcha code in com_user
« Reply #9 on: March 11, 2010, 08:11:32 AM »
Thanks for the reply and information.

Thanks for the template, I will add the appropriate css added to my site to get it displaying correctly.

I am still seeing some odd errors.

If the passwords do not match I am getting the 500 Redbox error.

I think this is a joomla core error, could it be related to SEF? (I am using sh404SEF)

For my template override I only added the default.php file to the register folder, do I need the others?


If I enter the wrong captcha I get an error at the top of the page
"The captcha wasn't entered correctly. reCAPTCHA said: incorrect-captcha-sol"
This does not happen on your page.

Here is the page I am working on:
http://www.ipodspeakerreviews.com/index.php?option=com_user&lang=en&view=register


Thanks!
« Last Edit: March 11, 2010, 08:13:20 AM by intown »

Offline BDD

  • Global Moderator
  • Full Member
  • *****
  • Posts: 146
  • Karma: +0/-0
    • View Profile
Re: ReCaptcha code in com_user
« Reply #10 on: March 15, 2010, 02:32:19 AM »
If the passwords do not match I am getting the 500 Redbox error.

I think this is a joomla core error, could it be related to SEF? (I am using sh404SEF)

Yes, this might be either Joomla core or sh404SEF behavior. I think it is not problem in their code.

For my template override I only added the default.php file to the register folder, do I need the others?

No, you need to override just the default.php file.

If I enter the wrong captcha I get an error at the top of the page
"The captcha wasn't entered correctly. reCAPTCHA said: incorrect-captcha-sol"
This does not happen on your page.

You can strip out that message by editing the file your-joomla-location/plugins/system/jezReCaptcha/helper.php. Look for following line of code and remove/comment it:

Code: [Select]
JError::raiseWarning('SOME_ERROR_CODE', JText::_("The captcha wasn't entered correctly. reCAPTCHA said:").' '.$resp->error);

 

This is not an official Joomla! Site. The use of the words Joomla is intended to describe what the products are designed for and should not be considered an endorsement by the related Projects.