Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

osC reCaptcha


olsonsp4c

Recommended Posts

  • 2 months later...
  • Replies 116
  • Created
  • Last Reply

Top Posters In This Topic

Hello,

I do not have to much experience with Mysql. When I try to add "reCaptcha.sql" I get this message:

 

 

NSERT INTO configuration_group( configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible )

VALUES ( 1601, 'reCaptcha', 'Storing and editing your reCaptcha configuration', '101', '1' ) ;

MySQL said: b_help.png

#1062 - Duplicate entry '1601' for key 1

 

 

Any help, thank you.

Andrea

Link to comment
Share on other sites

  • 1 month later...

Hi, I have successfully installed this contribution to version 2.3.1.

 

My question is,does anyone know how to change the text layout so that a black blot does not appear behind the letters/words as most of the words are hard to read and I keep having to refresh the text so I can workout what both words say?

 

I hope that makes sense?

 

Michael

Link to comment
Share on other sites

  • 6 months later...

Hi everyone,

 

Im just wondering if anyone has come accross an error when using this contribution with an OSC 2.3.1 store with the create account function and shared SSL.

 

I receive this error when trying to create an account with shared ssl:

 

Input error: Invalid referer

 

The reason I ask is that the shared SSL creates a different url to access the create account page - usually in this form - /secure.hosting_provider.com/~mydomain/create_account.php

 

Now my question is this, is there a code edit that I may have missed to allow recaptcha to see the shared secure hosting as my domain or at least see my domain and realise that its going to the shared ssl url where its actually needed- I hope that makes sense.

 

Any help would be appreciated.

 

Cheers!

Link to comment
Share on other sites

You ever considered something a little simpler like an "anti-robot" or "challenge" question?

:unsure:

 

I don't know about you but I really, really, hate every reCaptcha I've ever seen. They're all so distorted even I have trouble figuring most of them out.

:huh:

 

On the site I manage I put a challenge question on the create account and the contact us pages.

 

Something like "What color is a lemon?", to which the correct answer would be "yellow" of course.

 

If you want to try this instead I'd post the required code changes.

 

The site I did it on was a 2.2 site but doing it on a 2.3 site isn't any more difficult.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Hi Jim,

 

Yeah I was looking for anti robot for OSC2.3.1 but the version listed in the contributions add ons section was still for 2.2 so I figured I would try the recaptcha so as to avoid any code conflict.

 

By the way, I went to full SSL on my site and my problems have magically "cough" gone away.

 

Is your challenge question in the contributions section? I cant seem to find anything regarding the challenge question in there.

 

Any pointers would be appreciated.

 

Cheers!

Link to comment
Share on other sites

I haven't finished the code yet and I never made the 2.2 version into a contribution.

 

I could post the code later today if you're still interested.

 

IMHO it is better than the twisted image reCaptcha, but you know what they say about opinions...

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Hi Jim, my apologies for not replying earlier.

 

Thank you for your offer of the code, it would be geatly appreciated if you could post it when you have the time.

 

And I do fully know what they say about opinions....just ask my ex LOL (hence ex).

 

Cheers!

Link to comment
Share on other sites

Please backup all files involved before making edits.

 



Adding a "Challenge" or "anti robot" question to the "Contact Us" page.

 

First you have to add the challenge question, answer, and error message when they get it wrong to each language you support (ie /catalog/includes/languages/[INSERT EACH SUPPORTED LANGUAGE HERE]/contact_us.php

 

My examples:

 

// anti robot modifiactions start
define('CHALLENGE_QUESTION', 'Seven days equals one what:');
define('CHALLENGE_ANSWER', 'week');
define('CHALLENGE_WRONG_ANSWER', 'Incorrect challenge question answer.');
// anti robot modifiactions end

 

Then modify the "code file" (ie /catalog/contact_us.php)

 

Towards the top of the "code file" find this code:

 

if ($error == false) {

 

Just BEFORE that code ADD this code:

 

// BOF challenge question addition
$robotanswer = tep_db_prepare_input($HTTP_POST_VARS['robotanswer']);
if ( strtolower( $robotanswer ) != strtolower( CHALLENGE_ANSWER ) ) {
  $error = true;
  $messageStack->add('contact', CHALLENGE_WRONG_ANSWER);
}
// EOF challenge question addition

 

Towards the bottom of the "code file" find this code:

 

  <tr>
	<td class="fieldKey" valign="top"><?php echo ENTRY_ENQUIRY; ?></td>
	<td class="fieldValue"><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>
  </tr>

 

Just AFTER that code ADD this code:

 

<!-- BOF challenge question addition //-->
  <tr>
	<td class="fieldKey"><?php echo CHALLENGE_QUESTION; ?></td>
	<td class="fieldValue"><?php echo tep_draw_input_field('robotanswer') . ' ' . (tep_not_null(CHALLENGE_QUESTION) ? '<span class="inputRequirement">' . FORM_REQUIRED_INFORMATION . '</span>': ''); ?></td>
  </tr>
<!-- EOF challenge question addition //-->

 





 

Adding a "Challenge" or "anti robot" question to the "Create Account" page.

 

First you have to add the challenge question, answer, and error message when they get it wrong to each language you support (ie /catalog/includes/languages/[INSERT EACH SUPPORTED LANGUAGE HERE]/create_account.php

 

My examples:

 

// anti robot modifications start
define('CHALLENGE_QUESTION', 'Water that falls from the sky is called:');
define('CHALLENGE_ANSWER', 'rain');
define('CHALLENGE_WRONG_ANSWER', 'Incorrect challenge question answer.');
// anti robot modifications end

 

Then modify the "code file" (ie /catalog/create_account.php)

 

Towards the top of the "code file" find this code:

 

if ($error == false) {

 

Just BEFORE that code ADD this code:

 

// BOF challenge question addition
$robotanswer = tep_db_prepare_input($HTTP_POST_VARS['robotanswer']);
if ( strtolower( $robotanswer ) != strtolower( CHALLENGE_ANSWER ) ) {
  $error = true;
  $messageStack->add('create_account', CHALLENGE_WRONG_ANSWER);
}
// EOF challenge question addition

 

Towards the bottom of the "code file" find this code:

 

  <tr>
	<td class="fieldKey"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td>
	<td class="fieldValue"><?php echo tep_draw_password_field('confirmation') . ' ' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?></td>
  </tr>

 

Just AFTER that code ADD this code:

 

<!-- BOF challenge question addition //-->
  <tr>
	<td class="fieldKey"><?php echo CHALLENGE_QUESTION; ?></td>
	<td class="fieldValue"><?php echo tep_draw_input_field('robotanswer') . ' ' . (tep_not_null(CHALLENGE_QUESTION) ? '<span class="inputRequirement">' . substr(FORM_REQUIRED_INFORMATION,0,1) . '</span>': ''); ?></td>
  </tr>
<!-- EOF challenge question addition //-->

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

  • 3 weeks later...
  • 5 months later...

Can someone please tell me why I'm getting this?

 

Fatal error: Call to undefined function _recaptcha_qsencode() in /home/content/16/8316116/html/includes/functions/recaptchalib.php on line 69

 

Thanks

Link to comment
Share on other sites

  • 4 months later...

I am using this contribution with an OSC 2.3.3 store with the create account function and shared SSL.

 

In a non ssl environment contribution works fine, but I receive this error when trying to create an account with shared ssl:

Input error: Invalid referer

 

Please, can someone tell me if this contribution works with shared ssl?

 

Kind regards

Link to comment
Share on other sites

  • 4 years later...
4 hours ago, danish8388 said:

Will the the Osc reCaptcha addon work with Google's reCaptcha v2?

If you are using the responsive version of osC consider using this...

http://www.clubosc.com/29daysofcode/10.php

You'll not only get a well written, up-to-date modular add on that is easy to install but you'll also be helping to support the community builds.

Dan

 

Link to comment
Share on other sites

  • 1 month later...

hi,

I'm working on a new reCAPTCHA module for the latest BS Edge version and have a couple of coding challenges that I'm having some difficulty with. If anyone could help out or do a joint effort, I'd love to hear from you.

Demitry

 

osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&amp;geo=US&amp;q=oscommerce

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...