News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

reCAPTCHA for SMF

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

Previous topic - Next topic

hamav8tor

Quote from: njtweb on August 11, 2018, 10:48:21 AM
Have you tried the new version she just updated?

If you mean 2.0.0, yes. Uninstalled 1.0.0 and installed 2.0.0. Still just hangs and times out.

Mick.

#841
Hey bro.... validator.w3.org can be a pain and stupid. It showed an error in validation in this bit
/Sources/recaptcha/recaptcha-for-smf.php

    $context['html_headers'] .= '<script src="https://www.google.com/recaptcha/api.js"></script>';

had to add the  type="text/javascript" to it to clear the error.  ;) Thought i'd would let you know.

    $context['html_headers'] .= '<script type="text/javascript" src="https://www.google.com/recaptcha/api.js"></script>';

SychO

Quote from: Mick. on August 24, 2018, 12:39:52 PM
Hey bro.... validator.w3.org can be a pain and stupid. It showed an error in validation in this bit
/Sources/recaptcha/recaptcha-for-smf.php

    $context['html_headers'] .= '<script src="https://www.google.com/recaptcha/api.js"></script>';

had to add the  type="text/javascript" to it to clear the error.  ;) Thought i'd would let you know.

    $context['html_headers'] .= '<script type="text/javascript" src="https://www.google.com/recaptcha/api.js"></script>';

But if you use HTML5 it'll ask you to remove it instead :3
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Mick.

#843
Quote from: SychO on August 24, 2018, 12:41:38 PM
Quote from: Mick. on August 24, 2018, 12:39:52 PM
Hey bro.... validator.w3.org can be a pain and stupid. It showed an error in validation in this bit
/Sources/recaptcha/recaptcha-for-smf.php

    $context['html_headers'] .= '<script src="https://www.google.com/recaptcha/api.js"></script>';

had to add the  type="text/javascript" to it to clear the error.  ;) Thought i'd would let you know.

    $context['html_headers'] .= '<script type="text/javascript" src="https://www.google.com/recaptcha/api.js"></script>';

But if you use HTML5 it'll ask you to remove it instead :3
ah, My themes and Default theme are not.
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>

青山 素子

Quote from: hamav8tor on August 18, 2018, 08:29:32 AM
If you mean 2.0.0, yes. Uninstalled 1.0.0 and installed 2.0.0. Still just hangs and times out.

That's some pretty odd behavior you are experiencing. The only thought I have is that something is configured so that the server can't contact the reCAPTCHA backend to verify the information.

If you want to try some things, there's example code over at https://github.com/google/ReCAPTCHA (which is the library I use for the modification) you can upload and test with some pretty simple code. If that doesn't work, then it's something with the server.

I won't be able to offer help for uploading and getting that example code working, sorry.


Quote from: Mick. on August 24, 2018, 12:39:52 PM
had to add the  type="text/javascript" to it to clear the error.  ;) Thought i'd would let you know.

Thanks for the information. In practicality, having the type attribute missing shouldn't have a negative effect. However, I verified that it's required for HTML 4 and XHTML 1.x and optional for HTML 5. Since the presence isn't a problem in HTML 5, I'll make that change in a future release.
Motoko-chan
Director, Simple Machines

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


njtweb

Is there an issue with Re-captcha today? I am using the latest version 2.0, (turned off and using the default anti-spam) but had to turn off because I'm getting hammered with bot posts as if recaptcha isn't working at all. Until today I've never had any issues with the previous or latest versions for guest posting or registrations.

青山 素子

Quote from: njtweb on September 21, 2018, 10:40:43 AM
Is there an issue with Re-captcha today? I am using the latest version 2.0, (turned off and using the default anti-spam) but had to turn off because I'm getting hammered with bot posts as if recaptcha isn't working at all. Until today I've never had any issues with the previous or latest versions for guest posting or registrations.

reCAPTCHA has been broken for a long time. Most widespread CAPTCHA solutions have been. There are actual businesses out there farming out solving work to poor countries and charging pennies per solve. I don't advise using it by itself and instead using anti-spam questions with or without a CAPTCHA.
Motoko-chan
Director, Simple Machines

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


Mick.

Quote from: 青山 素子 on September 21, 2018, 09:19:05 PM
Quote from: njtweb on September 21, 2018, 10:40:43 AM
Is there an issue with Re-captcha today? I am using the latest version 2.0, (turned off and using the default anti-spam) but had to turn off because I'm getting hammered with bot posts as if recaptcha isn't working at all. Until today I've never had any issues with the previous or latest versions for guest posting or registrations.

reCAPTCHA has been broken for a long time. Most widespread CAPTCHA solutions have been. There are actual businesses out there farming out solving work to poor countries and charging pennies per solve. I don't advise using it by itself and instead using anti-spam questions with or without a CAPTCHA.
Hmmm....i dont use any of those questions. Just captcha alone. I have no spammers. idk.

njtweb

Crap, I hope my traffic will keep coming back. They're not going to like the legacy conventional anti-spam measures. Anything beyond just clicking a box for 45-50 year olds is like driving a stake through your website future.

Yikesfactor

Why is it when I activate to use this, when you register, it gets an error message, saying you didn't enter the letters required, when there were none?

The normal system is set to None.

I had to turn this off, since it appears to not work properly with the normal system.

Any way around this?

I prefer the tick box to the letters.

(No time to read 43 pages, so just asking.)
Version 2.0.15

Used phpBB before, new to SMF.

I know enough to be dangerous.
Breaking things is my specialty.

青山 素子

The error message is the default one, so it's a bit confusing. Are you using a custom theme? There are a few edits that may be needed in such a case.
Motoko-chan
Director, Simple Machines

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


Web Help Forums

#851
I have a weird problem with this plugin.

1)
It is not possible to combine with the built-in captcha. Is that as designed? If I have both things enabled captcha is not shown

2)
If you use custom question and/or built-in captcha - the caption of the first edit box is not shown, only the ":"

青山 素子

If you are using the newest version, both the built-in and the reCAPTCHA should work independently. Likewise, the custom questions should work fine with reCAPTCHA and not show issues.

Note that this was only tested with the built-in themes. If you are using a custom theme, then there may be display issues.
Motoko-chan
Director, Simple Machines

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


Web Help Forums

I am using a non-default theme, so that is probably why then. Just seems like odd errors, but I will try investigate

Web Help Forums

I get the same error with default theme


青山 素子

I'll try to look into the issue this weekend.
Motoko-chan
Director, Simple Machines

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


-Rock Lee-

Mark me error in ../Themes/default/GenericControls.template.php try several ways but I can not make it work.

<div class="smalltext">
', $verify_context['questions'][$qIndex]['q'], ':<br />
<input type="text" name="', $verify_id, '_vv[q][', $verify_context['questions'][$qIndex]['id'], ']" size="30" value="', $verify_context['questions'][$qIndex]['a'], '" ', $verify_context['questions'][$qIndex]['is_error'] ? 'style="border: 1px red solid;"' : '', ' tabindex="', $context['tabindex']++, '" class="input_text" />
</div>';


they are the line 347-348 it marks me the error at the moment to implement it appears to me like the attached image (to see image) although I manage to remove it at the moment of registering it marks me error for not completing the captcha correctly.


Regards!

ADD: I forgot when I was editing it appears in the error logs 8: Undefined offset: 0 and 8: Undefined offset: 1
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Shambles

I got around this ":" issue by making the following change:

/Themes/default/GenericControls.template.php

Code (Find) Select
// Where in the question array is this question?
$qIndex = $verify_context['show_visual'] ? $i - 1 : $i;


Code (Replace) Select
// Where in the question array is this question?
$qIndex = ($verify_context['show_visual'] || $verify_context['use_recaptcha']) ? $i - 1 : $i;


I use reCaptcha and two questions.

-Rock Lee-

Quote from: Sh@mbles on October 19, 2018, 01:40:11 PM
I got around this ":" issue by making the following change:

/Themes/default/GenericControls.template.php

Code (Find) Select
// Where in the question array is this question?
$qIndex = $verify_context['show_visual'] ? $i - 1 : $i;


Code (Replace) Select
// Where in the question array is this question?
$qIndex = ($verify_context['show_visual'] || $verify_context['use_recaptcha']) ? $i - 1 : $i;


I use reCaptcha and two questions.

I just wanted to use only the captcha but it gave me that error, I'm also going to check it that thanks @Sh@mbles.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Shambles

Well, the code that demands verification and issues the questions is within a loop.

If visual verification has been requested the loop shows this first, then adjusts the index into the question list accordingly (to ensure it starts at 0).

If reCaptcha is involved the loop index isn't adjusted so the questions subscript goes out of bounds.

By setting visual verification to NONE the above fix will work if reCaptcha is installed and switched on.

If both visual verification AND reCaptcha are needed, the above fix may need changing, to something like this (untested):

Code (Change To) Select
// Where in the question array is this question?
$qIndex = $verify_context['show_visual'] ? $i - 1 : $i;
                        $qIndex = $verify_context['use_recaptcha'] ? qIndex - 1 : qIndex;

Advertisement: