Results 1 to 10 of 694

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    8
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA

    Quote Originally Posted by David Allen View Post
    Hi JC - Sounds like a similar problem to Ronel's above. I can only think that either the $error flag isn't being set when the capatcha returns as not valid, or that $error isn't being checked properly before the mail is sent.
    If you could paste the top few lines of code from the file - I'll see what I can see.
    Regards
    David
    Hi Dave
    Here are the first few lines up to and including your changes. (/includes/modules/pages/contact_us/header_php.php

    Code:
    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    
    $error = false;
    if (isset($_GET['action']) && ($_GET['action'] == 'send')) {
      $name = zen_db_prepare_input($_POST['contactname']);
      $email_address = zen_db_prepare_input($_POST['email']);
      $enquiry = zen_db_prepare_input(strip_tags($_POST['enquiry']));
    
      $zc_validate_email = zen_validate_email($email_address);
    	// add in reCaptcha check
    	$resp = recaptcha_check_answer ($privatekey,
    		$_SERVER["REMOTE_ADDR"],
    		$_POST["recaptcha_challenge_field"],
    		$_POST["recaptcha_response_field"]);
    
    	if (!$resp->is_valid) {
    		// set the error code so that we can display it
    		$messageStack->add('contact', $resp->error);
    		$error = true;
    	}
    
    	if ($zc_validate_email and !empty($enquiry) and !empty($name) and $error == false) {
    I did not change the original version, I replaced it with the one you supplied.

    Thanks
    JC

  2. #2
    Join Date
    Feb 2008
    Location
    Amersham, Buckinghamshire, United Kingdom
    Posts
    141
    Plugin Contributions
    1

    Default Re: Support Thread for Google reCAPTCHA

    JC - can't see anything wrong with that - as you say it's the downloaded one. Very odd.
    I've quickly tried a few other things that I thought could possibly cause it (and some that I was sure wouldn't), but have come up blank. I can't get it to send without the reCAPATCHA filled in.
    I'm stumped, sorry. All I can suggest is putting some debugging statements in the file to try and find out why $error isn't being set to true when the reCAPATCHA isn't filled in.

  3. #3
    Join Date
    Nov 2008
    Posts
    8
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA

    Thanks for your prompt reply David. I will play around with it and post results here.

    JC

  4. #4
    Join Date
    Oct 2012
    Posts
    1
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA

    Hi JC,

    I am using the same templates as you and am having issues getting this to work as well.
    Did you have any luck getting the recaptcha to work?

    Peter

    Quote Originally Posted by David Allen View Post
    JC - can't see anything wrong with that - as you say it's the downloaded one. Very odd.
    I've quickly tried a few other things that I thought could possibly cause it (and some that I was sure wouldn't), but have come up blank. I can't get it to send without the reCAPATCHA filled in.
    I'm stumped, sorry. All I can suggest is putting some debugging statements in the file to try and find out why $error isn't being set to true when the reCAPATCHA isn't filled in.

  5. #5
    Join Date
    Feb 2008
    Location
    Amersham, Buckinghamshire, United Kingdom
    Posts
    141
    Plugin Contributions
    1

    Default Re: Support Thread for Google reCAPTCHA

    Quote Originally Posted by RePete View Post
    Hi JC,

    I am using the same templates as you and am having issues getting this to work as well.
    Did you have any luck getting the recaptcha to work?

    Peter
    Peter - what issues are you having? Perhaps a link to the problem would help me discover what is wrong.
    Regards
    David

 

 

Similar Threads

  1. Support Thread for CKEditor Plugin
    By DivaVocals in forum Addon Admin Tools
    Replies: 213
    Last Post: 18 Nov 2024, 04:17 AM
  2. Back to Top Plugin [Support Thread]
    By picaflor-azul in forum All Other Contributions/Addons
    Replies: 31
    Last Post: 6 Feb 2016, 10:52 PM
  3. v151 Plug 'n' Pay plugin [Support Thread]
    By KetchRescue in forum Addon Payment Modules
    Replies: 5
    Last Post: 28 Nov 2015, 04:56 AM
  4. Justuno Plugin [Support Thread]
    By JustunoApp in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 24 May 2015, 11:00 PM
  5. VendingBox Plugin Support Thread
    By vb_support in forum All Other Contributions/Addons
    Replies: 31
    Last Post: 10 Feb 2013, 07:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg