That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
After adding some suggested edits and increasing the regex line to include some other common strings, its back up on github here..
I have a feeling the regex string may not work below php7x, if you have issues, let me know.. Regex line was created using a regex editor, then tested in a debugger until I got it working the way I wanted.
looking for' www. cowboygeek.com http:// www. cowboygeek.com mailto:[email protected] [email protected] www. url-with-querystring.com/?url=has-querystring'
Dave
Always forward thinking... Lost my mind!
This is a great script! Thank you. I have one issue tho.. I only need the slider on the contact form as I'm getting tons of contact form spam. No spam registrations, etc.
So I uploaded:
/admin/includes/functions/extra_functions/init_noncaptcha.php
/includes/classes/observers/auto.non_captcha_observer.php
/includes/templates/responsive_classic/css/stylesheet_noncaptcha.css
/includes/templates/responsive_classic/templates/tpl_contact_us_default.php
/includes/modules/pages/contact_us/jscript_nonCaptcha.php
And in auto.non_captcha_observer.php I edited this:
Does that sound good? Any other suggestions?PHP Code:
public function __construct()
{
$this->attach($this, [
'NOTIFY_NONCAPTCHA_CHECK',
'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK', <-- I REMOVED THIS LINE.
'NOTIFY_CONTACT_US_CAPTCHA_CHECK',
'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK', <-- AND I REMOVED THIS LINE.
]);
}
Not really a good idea.. turns off all test by removing those lines.
To turn off slider for all, theirs a switch for that, to turn off just some of them.. comment out the slider test line and the code chunk in the template file. This well keep the other fields actively working for you.
Commenting out lines makes it easy to reactivate things later on.
includes/classes/observers/auto.non_captcha_observer.php
comment out
includes/templates/responsive_classic/templates/tpl_modules_create_account.phpCode:$this->testSliderFields('create_account');
Code:<?php if (SPAM_USE_SLIDER == 'true') { ?> <div class="slidecontainer"> <p><?php echo HUMAN_TEXT_DISPLAYED; ?></p> <?php echo zen_draw_input_field(SPAM_TEST_IQ, '', ' min="0" max="50" value="25" class="slider" id="id1"', 'range'); ?> <br /><br /> <span>Value:</span> <span id="f" style="font-weight:bold;color:red"></span> </div> <script> $(document).ready(function () { var slideCol = document.getElementById("id1"); var y = document.getElementById("f"); y.innerHTML = slideCol.value; // Display the default slider value // Update the current slider value (each time you drag the slider handle) slideCol.oninput = function() { y.innerHTML = this.value; if (this.value == "<?php echo SPAM_TEST; ?>") { y.innerHTML = "<?php echo SPAM_ANSWER; ?>"; } } }); //--></script> <?php } ?>
Dave
Always forward thinking... Lost my mind!
Dave, if you could put this mod on Github there are a few ideas I'd like to submit as PRs.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Let me know if you have problems with PR's, still learning in's and outs of github...
FYI.. with my site version I placed code to do logs when and where the honey pot is triggered. As such, the regex string is catching URL and email addresses in fields where they shouldn't be. Which is killing bots before the other fields are checked..![]()
Dave
Always forward thinking... Lost my mind!
Please let me know (by PM) the tells you're seeing. I'm collecting hints to add to a spam filter contribution to augment what zenNonCAPTCHA does.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
http://myembroideryhaven.com
v156a, php 7.1.32
Column layout grid
Langage Currency Links in Headers
Edit_orders 4.3.5
Canada Post shipping module
Flexible footer Menu
Simplified Social Share
Ip blocker
Ultimate SEO Urls
Newsletter Subscribe
Reward Point Full Suite
Recover Sales Cart
1st question: would my version of php cause issues with this mod?
2nd question: Dave are you using a mod for newsletter?
I'm asking these questions because i'm having a hard time making the mod work on my site and I really need it to work on my website with a mod for newsletter only subscriber. I saw Dr Byte's post referring to adding older files that are no longer in zc, however, I saw a "newsletteronly" class on your tpl_subscribe_default.php and thought maybe it would work if I used the same newsletteronly mod. Right now when I go live with zenNon-Captcha, I get the not a human yet message when creating an account and emails don't get added to the list for the newsletter subscription.
Bookmarks