News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

reCAPTCHA for SMF

Started by 青山 素子, December 28, 2007, 12:16:40 PM

Previous topic - Next topic

青山 素子

Everyone having issues with the errors in the error log, please uninstall 0.9.5.3 and install 0.9.5.4 (uploaded just now). It resolves those issues.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


gianko82

I have always the same installation error in the Register.template.php  :( ::)
(smf 1.1.7)

gianko82

Quote from: gianko82 on December 27, 2008, 11:07:35 PM
I have always the same installation error in the Register.template.php  :( ::)
(smf 1.1.7)
OOK I found the bug... I had "custom profile field" mod with some fields shown in the registration... so they changed my register template... I went to search manually the "to be edited" parts of the template and I installed it!
Now I'm waiting to get a reCaptcha Key... the site seems to be too slow  ::)

vulcan59

Hi Motoko-chan,

I carried out a manual mod since I couldn't un-install the previous installation and I am glad to report that there are no more problems.   :)

Thanks so much.

Happy New year

Ferkel

#104
Hello to all!
I've install this great plug-in.
It works fine in Firefox, Safari, Opera, Chrome browsers, but did not work in IE 6/7 ? :-[
Is it possible to resolve some how?
Thank you!

P.S. My forum's registration URL [nofollow]

krick

#105
I'm having issues with my site's color scheme.  For some reason, the reCAPTCHA input box has black text and it's almost unreadable.  Is there something I can change in my CSS to fix this?

Also, on IE7, it ignores my choice of reCAPTCHA theme and always uses the red one.

EDIT:  one more thing...  My page doesn't validate cleanly...
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.tankadin.com%2Findex.php%3Foption%3Dcom_smf%26Itemid%3D39%26action%3Dregister


My registration page...
http://www.tankadin.com/index.php?option=com_smf&Itemid=39&action=register

Here's what each reCAPTCHA theme looks like...





krick

#106
I figured out how to fix the edit box color.
You have to force it in the SMF theme style.css file...


#recaptcha_response_field
{
       background-color: white !important;
       color: black !important;
}


The other problems are still present...

1) IE7 not using chosen reCAPTCHA theme

2) html validation errors

EDIT: I've managed to fix some of the validation errors by editing Register.template.php, but I'm having trouble getting the last few without breaking the template parser.  I'll keep hacking on it.

krick

#107
I think I've fixed all the validation errors (changes are in red)...

Quote
if ($context['use_recaptcha'])
{
  echo '
        <script type="text/javascript">
          var RecaptchaOptions = {
            theme : \'', empty($modSettings['recaptcha_theme']) ? 'clean' : $modSettings['recaptcha_theme'] , '\',
          };
        </script>
       
        <script type="text/javascript"
          src="http://api.recaptcha.net/challenge?k=';, $modSettings['recaptcha_public_key'], '">
        </script>

        <noscript>
            <iframe src="http://api.recaptcha.net/noscript?k=';, $modSettings['recaptcha_public_key'], '"
              height="300" width="500" frameborder="0"></iframe><br />
            <textarea name="recaptcha_challenge_field" rows="3" cols="40">
            </textarea>
            <input type="hidden" name="recaptcha_response_field"
              value="manual_challenge" />
        </noscript>
      </td>
    </tr>
';
}

vulcan59

Hi Motoko-chan,

I've installed and using reCaptcha with no errors whatsoever. However, I have a question.

It was brought about by krick's reCaptcha theme pics. Mine does not look like that. Infact it looks "normal". I've attached an image.

What should the reCaptcha theme look like after the mod is installed?

krick

#109
Quote from: vulcan59 on December 31, 2008, 03:25:37 PM
Hi Motoko-chan,

I've installed and using reCaptcha with no errors whatsoever. However, I have a question.

It was brought about by krick's reCaptcha theme pics. Mine does not look like that. Infact it looks "normal". I've attached an image.

What should the reCaptcha theme look like after the mod is installed?



You need to "turn it on"...



Note that I probably should set the default SMF visual verification to "Disabled".  I didn't notice that until I made the screen shot.  That might have been the source of some of my html validation errors previously.

It would be nice if when you installed reCapcha, it replaced the default visual verification controls in the settings screen.  Or at least made it clear that it is a one-or-the-other situation so dummies like me don't mistakenly leave them both enabled.

vulcan59

Ahh ha. Thanks krick. So simple and I overlooked it.

Best regards and Happy New Year.

Cheers.

Gargoyle

Quote from: Motoko-chan on December 27, 2008, 10:58:40 PM
Everyone having issues with the errors in the error log, please uninstall 0.9.5.3 and install 0.9.5.4 (uploaded just now). It resolves those issues.

Is there a manual update I could do... I had to install this manually and would like the errors I get to stop.. So maybe just an idea of what was changed would work out for me...

Thanks!

青山 素子

Quote from: krick on December 31, 2008, 03:32:49 PM
Note that I probably should set the default SMF visual verification to "Disabled".  I didn't notice that until I made the screen shot.  That might have been the source of some of my html validation errors previously.

It would be nice if when you installed reCapcha, it replaced the default visual verification controls in the settings screen.  Or at least made it clear that it is a one-or-the-other situation so dummies like me don't mistakenly leave them both enabled.

You don't want to disable SMF's built-in, it will disable both, IIRC (i'd have to check to be 100% sure). In fact, you shouldn't have needed that table closing code. Are you using a modified or custom theme?


Quote from: Gargoyle on December 31, 2008, 07:26:34 PM
Is there a manual update I could do... I had to install this manually and would like the errors I get to stop.. So maybe just an idea of what was changed would work out for me...

If you are using 1.1.x, just search ManageRegistration for 'recaptcha_enable' and change to 'recaptcha_enabled'.

I changed quite a bit for the 2.0 stuff, so I'd need to run a diff for that.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


krick

Quote from: Motoko-chan on December 31, 2008, 09:24:17 PM
Quote from: krick on December 31, 2008, 03:32:49 PM
Note that I probably should set the default SMF visual verification to "Disabled".  I didn't notice that until I made the screen shot.  That might have been the source of some of my html validation errors previously.

It would be nice if when you installed reCapcha, it replaced the default visual verification controls in the settings screen.  Or at least made it clear that it is a one-or-the-other situation so dummies like me don't mistakenly leave them both enabled.

You don't want to disable SMF's built-in, it will disable both, IIRC (i'd have to check to be 100% sure). In fact, you shouldn't have needed that table closing code. Are you using a modified or custom theme?

I've got the SMF default visual verification turned off and I just successfully registered a test user with no issues.  Just to be sure, I deliberately typed the visual verification words wrong the first time to make sure that it was actually using the reCaptcha...





I'm using a custom theme, but the only source files that are modified for my theme are:

Display.template.php
index.php
index.template.php
style.css

My theme uses the default theme's copy of Register.template.php

krick

#114
In order to rule out any user error on my part, or conflicts with themes or other mods, I did a fresh SMF 1.1.7 installation, left the default theme, and only installed reCAPTCHAforSMF_0-9-5-4.tar.gz.

I did four tests, exercising every combination of captcha/reCAPTCHA verification, illustrated here...

Test 1 - no captcha


Test 2 - smf captcha


Test 3 - reCAPTCHA


Test 4 - smf captcha AND reCAPTCHA


HTML Validation Restults:
Test1 - no errors
Test2 - no errors
Test3 - 18 errors
Test4 - 18 errors

Here's the link to the registration page for test4:
http://testsmfrecaptcha.tankadin.com/smf/index.php?action=register

Here's the W3 Validator results for test4:
http://validator.w3.org/check?uri=http%3A%2F%2Ftestsmfrecaptcha.tankadin.com%2Fsmf%2Findex.php%3Faction%3Dregister

So, the only time when the html doesn't validate is when I've got the reCAPTCHA box checked.

vulcan59

FWIW, same here. I've got the visual verification disabled and reCaptcha enable and I had a new user register with no errors whatsoever.

Gargoyle

Quote from: Motoko-chan on December 31, 2008, 09:24:17 PM
Quote from: Gargoyle on December 31, 2008, 07:26:34 PM
Is there a manual update I could do... I had to install this manually and would like the errors I get to stop.. So maybe just an idea of what was changed would work out for me...

If you are using 1.1.x, just search ManageRegistration for 'recaptcha_enable' and change to 'recaptcha_enabled'.

I changed quite a bit for the 2.0 stuff, so I'd need to run a diff for that.

Worked perfectly thank you!

mkress

this line in code:
if($_POST["recaptcha_response_field"]) //Check the input if this exists, if it doesn't, then the user didn't fill it out.
should be changed to:
if(isset($_POST["recaptcha_response_field"])) //Check the input if this exists, if it doesn't, then the user didn't fill it out.

otherwise it will give an PHP-WARNING in some circumstances..

Blinker

I mentioned this earlier in this thread and it's the same issue that krick is having:

IE7 will NOT use the selected reCAPTCHA theme!

It defaults to the original with red, yellow and white.

My selected theme is Black Glass as I use a dark background theme and it suits it way more. Seamonkey & FF display the correct theme but I haven't had a chance to test Opera, Chrome or others. IE definitely doesn't want to comply!!!

Any ideas, or would this request be better sent to the reCAPTCHA team?

Gargoyle

8: Undefined index: recaptcha_challenge_field
File: /Sources/Register.php
Line: 183

I am getting this error presently. Like mentioned above I had to manually install this so if possible a manual fix would be appreciated.

Thanks!

Advertisement: