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.
Printable View
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
Hi
Sorry, looks like I missed one extra change to make
In /includes/classes/observers/class.google_recaptcha.php change line number 42
fromtoCode:$event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK' => 'create_account', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK' => 'review_text');
Then hopefully it should workCode:$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');
Hi - I'm not familiar with the testimonials page, did you create it via a plugin?
Regards
In an earlier post you had the code below, which I had originally used:
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!
Excellent - glad that worked
Regards
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']) {
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) {