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:
and change the line below it fromCode:$zco_notifier->notify('NOTIFY_ASK_A_QUESTION_CAPTCHA_CHECK');
toCode:if ($zc_validate_email and !empty($enquiry) and !empty($name)) {
in /includes/classes/observers/class.google_recaptcha.php insert this just below line number 23Code:if ($zc_validate_email and !empty($enquiry) and !empty($name) and $error == false) {
in your tpl_ask_a_question_default.php file (probably just under the textarea, so line 80) addCode:$pages_to_check[] = 'NOTIFY_ASK_A_QUESTION_CAPTCHA_CHECK';
That should do it :)Code:<?php echo recaptcha_get_html(); ?>
Hi Anne
Opps forgot - in /includes/classes/observers/class.google_recaptcha.php line 42 change
toCode:$event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK' => 'create_account', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK' => 'review_text');
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');
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 - I'm not familiar with the testimonials page, did you create it via a plugin?
Regards
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');
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!