Page 23 of 68 FirstFirst ... 13212223242533 ... LastLast
Results 221 to 230 of 676
  1. #221
    Join Date
    Aug 2010
    Location
    Hartland, MI
    Posts
    288
    Plugin Contributions
    3

    Default Re: Support Thread for Google reCAPTCHA plugin

    Quote Originally Posted by cj.dekrijger View Post
    Hello,

    I don't know if I am at the right place here but i haven's seen a "start thread" option. Here's
    my problem.
    reCAPTCHA is n't working all the time i haven't seen it on the new account page and not
    always on the contact us page. i checked the files they are all there in the right place, checked
    google key's they are also in the right file?
    So what can be wrong in my situation ? (check itparts.biz/zentest)
    It seemed to show up fine on both the account and contact page for me. I used chrome, cleared cache and jumped around. It showed every time.

  2. #222
    Join Date
    Dec 2015
    Location
    AZ
    Posts
    2
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA plugin

    Quote Originally Posted by David Allen View Post
    Hi Anne
    I'm assuming you are using the 'Ask a Question' plugin - https://www.zen-cart.com/downloads.php?do=file&id=109
    If so, it should be fairly easy to add it to that.
    Essentially you need too look at the instruction for pre-1.5.1 installation

    In /includes/modules/ask_a_question/header.php just after line 41 add:
    Code:
    $zco_notifier->notify('NOTIFY_ASK_A_QUESTION_CAPTCHA_CHECK');
    and change the line below it from
    Code:
    if ($zc_validate_email and !empty($enquiry) and !empty($name)) {
    to
    Code:
    if ($zc_validate_email and !empty($enquiry) and !empty($name) and $error == false) {
    in /includes/classes/observers/class.google_recaptcha.php insert this just below line number 23
    Code:
    $pages_to_check[] =  'NOTIFY_ASK_A_QUESTION_CAPTCHA_CHECK';
    in your tpl_ask_a_question_default.php file (probably just under the textarea, so line 80) add
    Code:
    <?php echo recaptcha_get_html(); ?>
    That should do it :)

    I added the recaptcha to the Ask A Question as described. My only issue is that no error message is shown if they forget to mark the checkbox. How do I make the error message appear like it does on the Contact Us form?

  3. #223
    Join Date
    Jan 2012
    Posts
    89
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA plugin

    Any idea how to implement this on the Testimonials Page? I have it setup on all our other pages like Contact Us, Reviews, Create Account Etc. but been getting spam testimonials.

    Thank you

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

    Default Re: Support Thread for Google reCAPTCHA plugin

    Hi
    Sorry, looks like I missed one extra change to make
    In /includes/classes/observers/class.google_recaptcha.php change line number 42
    from
    Code:
    $event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK' => 'create_account', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK' => 'review_text');
    to
    Code:
    $event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK' => 'create_account', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK' => 'review_text','NOTIFY_ASK_A_QUESTION_CAPTCHA_CHECK' => 'contact');
    Then hopefully it should work

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

    Default Re: Support Thread for Google reCAPTCHA plugin

    Hi - I'm not familiar with the testimonials page, did you create it via a plugin?

    Regards

  6. #226
    Join Date
    Dec 2015
    Location
    AZ
    Posts
    2
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA plugin

    Quote Originally Posted by David Allen View Post
    Hi
    Sorry, looks like I missed one extra change to make
    In /includes/classes/observers/class.google_recaptcha.php change line number 42
    from
    Code:
    $event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK' => 'create_account', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK' => 'review_text');
    to
    Code:
    $event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK' => 'create_account', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK' => 'review_text','NOTIFY_ASK_A_QUESTION_CAPTCHA_CHECK' => 'contact');
    Then hopefully it should work
    In an earlier post you had the code below, which I had originally used:

    Quote Originally Posted by David Allen View Post
    Hi Anne
    Opps forgot - in /includes/classes/observers/class.google_recaptcha.php line 42 change
    Code:
    $event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK' => 'create_account', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK' => 'review_text');
    to
    Code:
    $event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK' => 'create_account', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK' => 'review_text','NOTIFY_ASK_A_QUESTION_CAPTCHA_CHECK' => 'ask_a_question');
    So now I replaced the line below:
    'review_text','NOTIFY_ASK_A_QUESTION_CAPTCHA_CHECK' => 'ask_a_question')

    With:
    'review_text','NOTIFY_ASK_A_QUESTION_CAPTCHA_CHECK' => 'contact')

    And it worked perfectly.

    Thank you!

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

    Default Re: Support Thread for Google reCAPTCHA plugin

    Excellent - glad that worked
    Regards

  8. #228
    Join Date
    Jan 2012
    Posts
    89
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA plugin

    Quote Originally Posted by David Allen View Post
    Hi - I'm not familiar with the testimonials page, did you create it via a plugin?

    Regards
    Yes, it's a plugin called Testimonial Manager.

  9. #229
    Join Date
    Aug 2009
    Posts
    44
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA plugin

    First, Thank you for this mod! I am trying to add to my store http://kidswithagrin.com
    It works on create an account but not on contact_us. I tried to manually modify the header_php.php file with no luck. Here is my original file. Do you see anything wrong? Thank you!

    <?php
    /**
    * Contact Us Page
    *
    * @package page
    * @copyright Copyright 2003-2007 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

    * @version $Id: header_php.php 6202 2007-04-12 22:56:10Z drbyte $
    * Adapted by Joe McFrederick for reCAPTCHA text
    */
    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    // reCAPTCHA mod BOF
    require(DIR_WS_CLASSES . 'recaptchalib.php');
    // reCAPTCHA mod EOF
    $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);
    // reCAPTCHA mod BOF 1 of 2
    if(CONTACT_US_RECAPTCHA_STATUS == 'true')
    { // start modification for reCaptcha
    // the response from reCAPTCHA
    $resp = null;

    // was there a reCAPTCHA response?
    $resp = recaptcha_check_answer (CONTACT_US_RECAPTCHA_PRIVATE_KEY,
    $_SERVER["REMOTE_ADDR"],
    zen_db_prepare_input($_POST["recaptcha_challenge_field"]),
    zen_db_prepare_input($_POST["recaptcha_response_field"])
    );
    }
    // reCAPTCHA mod BOF 1 of 2

    if ($zc_validate_email and !empty($enquiry) and !empty($name))

    // auto complete when logged in

    if($_SESSION['customer_id']) {

  10. #230
    Join Date
    Aug 2009
    Posts
    44
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA plugin

    I changed the header_php.php to the following with no luck:


    * @copyright Portions Copyright 2003 osCommerce

    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

    * @version $Id: header_php.php 6202 2007-04-12 22:56:10Z drbyte $

    * Adapted by Joe McFrederick for reCAPTCHA text

    */

    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) {

 

 
Page 23 of 68 FirstFirst ... 13212223242533 ... LastLast

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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR