Advertisement:
GCWebhosting

Author Topic: reCAPTCHA for SMF  (Read 407520 times)

Offline landyvlad

  • Sr. Member
  • ****
  • Posts: 862
  • Gender: Male
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: reCAPTCHA for SMF
« Reply #880 on: December 17, 2018, 05:19:41 AM »
So is this actually working 'out of the box' for 2.0.15 these days?

Also why are some mods distributed as tar.gz when the package manager requires a Zip format ?
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

No hack nor blackhats, just persistent asshats.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,256
    • StoryBB/StoryBB on GitHub
Re: reCAPTCHA for SMF
« Reply #881 on: December 17, 2018, 05:23:25 AM »
Package manager can handle both tar.gz (aka tgz) and zip just fine.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline landyvlad

  • Sr. Member
  • ****
  • Posts: 862
  • Gender: Male
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: reCAPTCHA for SMF
« Reply #882 on: December 17, 2018, 05:32:01 AM »
Hmm, maybe it was some other format I had trouble with. Thanks Arantor :)

As an aside - is a tar.gz also known as a "tarball" or is that a whole other Linux type thing?
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

No hack nor blackhats, just persistent asshats.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,256
    • StoryBB/StoryBB on GitHub
Re: reCAPTCHA for SMF
« Reply #883 on: December 17, 2018, 06:05:31 AM »
Yeah, that’s a tarball. Basically, tar is a thing that bundles everything up into a single file, and then you compress it separately, which is why tar.bz2 and tar.gz exist - tar is the bundle, gz or bz2 is the compression.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Online GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,089
  • Gender: Male
    • Macedonian electronics forum
Re: reCAPTCHA for SMF
« Reply #884 on: December 17, 2018, 10:26:52 AM »
Think of a tarballs like an ISO image ;). It's similar ;).

Hmm, maybe it was some other format I had trouble with. Thanks Arantor :)

There was a mod that was accidentally compressed in rar instead of zip, but I can't remember the mod right now :P :D.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline landyvlad

  • Sr. Member
  • ****
  • Posts: 862
  • Gender: Male
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: reCAPTCHA for SMF
« Reply #885 on: December 17, 2018, 11:54:12 PM »
thanks :)
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

No hack nor blackhats, just persistent asshats.

Offline tgojevic

  • Newbie
  • *
  • Posts: 6
Re: reCAPTCHA for SMF
« Reply #886 on: December 22, 2018, 07:11:22 PM »
Hi,

I added your mod today, latest version, and this is the error I have on my site now:

Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /home/tapandtr/public_html/period/forum/Sources/recaptcha/autoload.php on line 8

can you please help me out here? I did the manual backup but nothing changed...

Offline SugarD-x

  • Jr. Member
  • **
  • Posts: 360
  • Gender: Male
  • SMF and PHPBB Fan
    • SugarDx on Facebook
    • SugarD-x on GitHub
    • sugardx on LinkedIn
    • @SugarDx on Twitter
    • Clan Xperience
Re: reCAPTCHA for SMF
« Reply #887 on: December 23, 2018, 12:48:00 AM »
Hi,

I added your mod today, latest version, and this is the error I have on my site now:

Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /home/tapandtr/public_html/period/forum/Sources/recaptcha/autoload.php on line 8

can you please help me out here? I did the manual backup but nothing changed...
Make sure you read through the past pages in this topic. Users have been updating the mod to help each other out. A lot of fixes are published in here randomly.

Offline Deaks

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,147
  • Gender: Male
Re: reCAPTCHA for SMF
« Reply #888 on: December 23, 2018, 01:51:47 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;

Any update I using the 2.0 version and even this change gives same error message.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,149
  • Gender: Male
    • i30 Owners Club
Re: reCAPTCHA for SMF
« Reply #889 on: December 23, 2018, 02:25:32 PM »
What error message?

Offline Deaks

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,147
  • Gender: Male

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,149
  • Gender: Male
    • i30 Owners Club
Re: reCAPTCHA for SMF
« Reply #891 on: December 23, 2018, 03:03:06 PM »
What's your antispam setup configured as?

Mine is set to:

Use reCAPTCHA Verification System:    checked
Visual verification image to display:    none
Number of verification questions user must answer:    2

With those, the amendment I have in GenericControls.template.php is

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


... and it all works fine. For me. With those settings.

Offline Deaks

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,147
  • Gender: Male
Re: reCAPTCHA for SMF
« Reply #892 on: December 23, 2018, 03:28:42 PM »
Use reCAPTCHA Verification System:    checked
Visual verification image to display:    medium
Number of verification questions user must answer:    1

and that above edit in the file

getting

Quote
8: Undefined offset: 1 Apply Filter: Only show the errors from this file File: /home/<<somesime>>/public_html/Themes/default/GenericControls.template.php
Line: 348

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,149
  • Gender: Male
    • i30 Owners Club
Re: reCAPTCHA for SMF
« Reply #893 on: December 23, 2018, 04:45:22 PM »
What can I say? Turn off your visual verification system [=none]. Why need both visual systems?

Offline Deaks

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,147
  • Gender: Male
Re: reCAPTCHA for SMF
« Reply #894 on: December 23, 2018, 04:58:51 PM »
after posting i  updated that seems to be the issue ... weird lol

Offline FaKiR

  • Newbie
  • *
  • Posts: 3
Re: reCAPTCHA for SMF
« Reply #895 on: January 12, 2019, 10:48:18 AM »
I tried to run reCAPTCHA for SMF without success

have error talking about letters not matching.

I tried to replace code as said by Sh@mbles but have the same error.

my setup :

I want to use reCAPTCHA only

Use reCAPTCHA Verification System: checked

Visual verification image to display: none

Number of verification questions user must answer:  0

use a custom theme but there is no GenericControls.template.php

Offline SugarD-x

  • Jr. Member
  • **
  • Posts: 360
  • Gender: Male
  • SMF and PHPBB Fan
    • SugarDx on Facebook
    • SugarD-x on GitHub
    • sugardx on LinkedIn
    • @SugarDx on Twitter
    • Clan Xperience
Re: reCAPTCHA for SMF
« Reply #896 on: January 12, 2019, 11:09:48 AM »
I tried to run reCAPTCHA for SMF without success

have error talking about letters not matching.

I tried to replace code as said by Sh@mbles but have the same error.

my setup :

I want to use reCAPTCHA only

Use reCAPTCHA Verification System: checked

Visual verification image to display: none

Number of verification questions user must answer:  0

use a custom theme but there is no GenericControls.template.php
There are multiple code changes throughout this topic that you may need to apply.

It would be nice if someone would compile a new version from all of these past fixes and create a new package.

Offline FaKiR

  • Newbie
  • *
  • Posts: 3
Re: reCAPTCHA for SMF
« Reply #897 on: January 12, 2019, 03:30:25 PM »
Thank for quick reply SugarD-x

I have solved my problem with activate allow_url_fopen

it works fine now

Offline SugarD-x

  • Jr. Member
  • **
  • Posts: 360
  • Gender: Male
  • SMF and PHPBB Fan
    • SugarDx on Facebook
    • SugarD-x on GitHub
    • sugardx on LinkedIn
    • @SugarDx on Twitter
    • Clan Xperience
Re: reCAPTCHA for SMF
« Reply #898 on: January 13, 2019, 09:49:38 AM »
Thank for quick reply SugarD-x

I have solved my problem with activate allow_url_fopen

it works fine now
Awesome!

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 #899 on: January 14, 2019, 07:37:32 AM »
Using this

Code: [Select]
$qIndex = ($verify_context['show_visual'] || $verify_context['use_recaptcha']) ? $i - 1 : $i;
Does not solve the issue for me.

I have enabled:
- visual captcha (SMF built-in)
- two custom answers (SMF built-in)
-  ReCaptcha...

Replacing the old code line with the one above simply hides ReCaptcha.



Code: [Select]
           
$qIndex = $verify_context['show_visual'] ? $i - 1 : $i;
$qIndex = $verify_context['use_recaptcha'] ? qIndex - 1 : qIndex;

Also does not work. Hides Recapcha and text is ":" for the custom questions/answers
WebHelpForums.net - webmaster discussion such as website tools, SEO and marketing
MicrosysTools.com - A1 Sitemap Generator, A1 Website Analyzer etc.