Loading


Advertisement:

Author Topic: [Plugin] Invisible reCaptcha by Google for Osclass (beta)  (Read 313 times)

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 1570
  • osclass.work
[Plugin] Invisible reCaptcha by Google for Osclass (beta)
« on: March 11, 2017, 10:16:18 pm »
*** UPDATED *** 2017-03-15
* there was an issue with an early release of v1.0.1 with some old names for preference keys, it should be fine now.

Hold your horses! :)

There are few issues with Invisible reCaptcha that might hold you back and stick with the traditional version:

  • It requires JavaScript enabled browsers, visitors who come without js enabled will be left behind captcha wall (this has good and bad side; good - most dumb bots do not execute js, but most clever ones do, and bad: older devices/users/systems/whatever will not be able to engage with your forms/websites
  • The 2nd issue is a more problematic, at least for me - invisible captcha takes precedence over jquery validate() (when user hits the button before filling-in any of the required inputs), which means captcha will kick-in, users will solve it, server will bounce forms... (if user is logged-in into Google's services, captcha will not be shown anyway, and validation will work in that case).

Still, it's great to give it a go as an experiment in dev/testing environment. Just install it, go to Configure and follow instructions. It's that simple. Unfortunately, due to binding method and different themes, it is a bit harder to achieve no-theme-modifications goal, it could be done later with some js, but for now, manual method is error-free. (integrated auto-binding in v1.0.1)



Generate new API keys per instructions and check INVISIBLE type in the options (keep your old keys, don't delete them just yet).

For some reason in my system it does not work on localhost, even with dedicated keys and whitelisted domain, so you'll have to setup a valid live domain/subdomain in that case.

Admin Dashboard screenshot is provided. Default badge is set to inline, just for your orientation as it is the least intrusive imho, but you may change the keyword in the options (on purpose it is a text input, something might change in near future, adding new modes, don't know really).



I am not sure if it will be released @ Market, because of integration issues, it will probably be easier to integrate it within the core and avoid the forms validation trouble.



Feedback / ideas are welcome.



Version 1.0.1 - automatic mode introduced, no longer requires theme modifications (supported all standard Osclass themes which do not change form names; warning: potential issues with non-standard themes!).

How To Upgrade Instructions:
1. Uninstall properly old plugin version (your keys will be kept in database, don't worry)
2. Delete old files, either via Admin Dashboard or FTP
3. Undo / Revert ALL changes that you've made to your theme's template files (e.g. remove CSS class 'invisible-recaptcha' - this is important step)
4. Upload new plugin .zip via FTP then unzip, or install through Admin Dashboard
5. Install new plugin version through Admin Dashboard
6. Plugin will start working instantly. By default, all locations are active, you can simply disable some locations if you have restrictions in place.
7. DONE

Version 1.0.0 - initial release



Thanks,
Regards
dev101
« Last Edit: March 15, 2017, 09:22:07 pm by dev101 »

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 1570
  • osclass.work
Re: [Plugin] Invisible reCaptcha by Google for Osclass (beta)
« Reply #1 on: March 13, 2017, 08:17:48 pm »
Updated to version 1.0.1

No longer requires any theme modifications (assuming standard form names from Bender are also present in your theme).

SteveJohnson

  • Sr. Member
  • ****
  • Posts: 288
  • Golden tip - Clear your cache :|
Re: [Plugin] Invisible reCaptcha by Google for Osclass (beta)
« Reply #2 on: March 23, 2017, 03:18:22 pm »
Thank you dev101 for working on this.

I was hoping google was making a more general purpose solution.. phew  :(

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 1570
  • osclass.work
Re: [Plugin] Invisible reCaptcha by Google for Osclass (beta)
« Reply #3 on: March 23, 2017, 06:13:34 pm »
Thanks SteveJohnson,

I have implemented it in several instances already, and it works fine with minor modifications for each theme. Problem is even in Bender there are forms that have no name, id or class, so they are impossible to uniquely identify, and tell apart which form should be with captcha. The above solution will work in Bender and themes which did not change names, and for those who did, editing it in the plugin's index.php function isn't that hard. Also, I strongly suggest to name all the forms properly, and avoid guess work for the plugin.

About validation issue, as the submit button now takes precedence, no resolution yet, and no one seems to have an idea either. But, it will not affect regular users in any way, only bots or malicious ones, so, not really a big concern. For users who start to fill-in the forms one field after another, it will work.

Regards