Advertisement:

Author Topic: reCAPTCHA for SMF  (Read 410125 times)

Offline hamav8tor

  • Newbie
  • *
  • Posts: 7
Re: reCAPTCHA for SMF
« Reply #840 on: August 18, 2018, 08:29:32 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.

Online Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,032
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: reCAPTCHA for SMF
« Reply #841 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

   
Code: [Select]
$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.

   
Code: [Select]
$context['html_headers'] .= '<script type="text/javascript" src="https://www.google.com/recaptcha/api.js"></script>';
« Last Edit: August 24, 2018, 12:55:53 PM by Mick. »

Offline SychO

  • Lead Customizer
  • SMF Hero
  • *
  • Posts: 1,526
  • Gender: Male
    • SychO9 on GitHub
    • SychO
Re: reCAPTCHA for SMF
« Reply #842 on: August 24, 2018, 12:41:38 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

Imazighen

Online Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,032
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: reCAPTCHA for SMF
« Reply #843 on: August 24, 2018, 12:42:29 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

   
Code: [Select]
$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.

   
Code: [Select]
$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.
   
Code: [Select]
<!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"' : '', '>
« Last Edit: August 24, 2018, 12:55:27 PM by Mick. »

Offline 青山 素子

  • Server Team
  • SMF Super Hero
  • *
  • Posts: 17,068
  • 戦場ヶ原、蕩れ!
    • srvrguy on GitHub
    • @motokochan on Twitter
    • Nekomusume Moe
Re: reCAPTCHA for SMF
« Reply #844 on: August 27, 2018, 10:01:59 PM »
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.


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.


Online njtweb

  • Sr. Member
  • ****
  • Posts: 958
Re: reCAPTCHA for SMF
« Reply #845 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.

Offline 青山 素子

  • Server Team
  • SMF Super Hero
  • *
  • Posts: 17,068
  • 戦場ヶ原、蕩れ!
    • srvrguy on GitHub
    • @motokochan on Twitter
    • Nekomusume Moe
Re: reCAPTCHA for SMF
« Reply #846 on: September 21, 2018, 09:19:05 PM »
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.


Online Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,032
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: reCAPTCHA for SMF
« Reply #847 on: September 21, 2018, 09:21:40 PM »
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.

Online njtweb

  • Sr. Member
  • ****
  • Posts: 958
Re: reCAPTCHA for SMF
« Reply #848 on: September 21, 2018, 10:57:18 PM »
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.

Offline Yikesfactor

  • Jr. Member
  • **
  • Posts: 196
Re: reCAPTCHA for SMF
« Reply #849 on: September 28, 2018, 10:59:17 AM »
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.

Offline 青山 素子

  • Server Team
  • SMF Super Hero
  • *
  • Posts: 17,068
  • 戦場ヶ原、蕩れ!
    • srvrguy on GitHub
    • @motokochan on Twitter
    • Nekomusume Moe
Re: reCAPTCHA for SMF
« Reply #850 on: September 28, 2018, 11:30:09 PM »
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.


Offline Web Help Forums

  • Semi-Newbie
  • *
  • Posts: 61
  • Website and Webmaster Help Forum
    • webhelpforums on Facebook
    • @webhelpforums on Twitter
    • Web Help Forums
Re: reCAPTCHA for SMF
« Reply #851 on: October 16, 2018, 08:22:14 AM »
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 ":"
« Last Edit: October 16, 2018, 09:14:20 AM by Web Help Forums »
WebHelpForums.net - webmaster discussion such as website tools, SEO and marketing
MicrosysTools.com - A1 Sitemap Generator, A1 Website Analyzer etc.

Offline 青山 素子

  • Server Team
  • SMF Super Hero
  • *
  • Posts: 17,068
  • 戦場ヶ原、蕩れ!
    • srvrguy on GitHub
    • @motokochan on Twitter
    • Nekomusume Moe
Re: reCAPTCHA for SMF
« Reply #852 on: October 17, 2018, 04:37:03 PM »
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.


Offline Web Help Forums

  • Semi-Newbie
  • *
  • Posts: 61
  • Website and Webmaster Help Forum
    • webhelpforums on Facebook
    • @webhelpforums on Twitter
    • Web Help Forums
Re: reCAPTCHA for SMF
« Reply #853 on: October 17, 2018, 09:07:22 PM »
I am using a non-default theme, so that is probably why then. Just seems like odd errors, but I will try investigate
WebHelpForums.net - webmaster discussion such as website tools, SEO and marketing
MicrosysTools.com - A1 Sitemap Generator, A1 Website Analyzer etc.

Offline Web Help Forums

  • Semi-Newbie
  • *
  • Posts: 61
  • Website and Webmaster Help Forum
    • webhelpforums on Facebook
    • @webhelpforums on Twitter
    • Web Help Forums
Re: reCAPTCHA for SMF
« Reply #854 on: October 18, 2018, 05:22:02 AM »
I get the same error with default theme

WebHelpForums.net - webmaster discussion such as website tools, SEO and marketing
MicrosysTools.com - A1 Sitemap Generator, A1 Website Analyzer etc.

Offline 青山 素子

  • Server Team
  • SMF Super Hero
  • *
  • Posts: 17,068
  • 戦場ヶ原、蕩れ!
    • srvrguy on GitHub
    • @motokochan on Twitter
    • Nekomusume Moe
Re: reCAPTCHA for SMF
« Reply #855 on: October 18, 2018, 12:32:14 PM »
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.


Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,955
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: reCAPTCHA for SMF
« Reply #856 on: October 18, 2018, 01:18:04 PM »
Mark me error in ../Themes/default/GenericControls.template.php try several ways but I can not make it work.

Code: [Select]
<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 © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,167
  • Gender: Male
    • i30 Owners Club
Re: reCAPTCHA for SMF
« Reply #857 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.

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,955
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: reCAPTCHA for SMF
« Reply #858 on: October 19, 2018, 01:54:48 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 © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,167
  • Gender: Male
    • i30 Owners Club
Re: reCAPTCHA for SMF
« Reply #859 on: October 19, 2018, 02:21:55 PM »
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;