Important announcements from CouchCMS team
12 posts Page 1 of 2
Hi everyone,

tl;dr: new recaptcha input type introduced in v2.0

Thwarting malicious form submissions by spammers, whether they be automated bots or humans (with too much time on their hands), can be a challenging task. This very matter has been discussed comprehensively in previous threads such as viewtopic.php?p=9255#p9255 where numerous solutions have been proposed. Some of these (e.g. consulting spam databases, utilizing honeypot fields) operate behind-the-scenes. Others however present an active obstacle for the user to overcome (e.g. challenge question) which inevitably harms user experience for the average person. The existing captcha field falls into the latter category and additionally, has become largely ineffective over time.

Accordingly, a new addon has been added to v2.0 that enables support for Google's reCAPTCHA service in the hopes of providing a more effective and user-friendly captcha option to fight spam and abuse. The difficulty of solving this captcha scales as various risk factors are analyzed (see Google's blog post for a proper explanation).

Thanks!

Documentation

Usage
Code: Select all
<cms:input name='recaptcha_test' type='recaptcha'/>

Parameters
  • theme
    • light (default)
    • dark
  • size
    • normal (default)
    • compact

Notes
You may wish to buffer the output of the reCAPTCHA field, so that it may be hidden upon successful form submission.
Code: Select all
<cms:capture 'recaptcha_buffer'>
    <cms:input name='recaptcha_test' type='recaptcha' theme='dark' size='compact'/>
</cms:capture>

<cms:if "<cms:not k_success/>">
    <cms:show recaptcha_buffer/>
</cms:if>
If you are utilizing this field in a form which may be submitted more than once, without reloading the page (e.g. AJAX), you will need to ask the end user to verify with reCAPTCHA again. This can be accomplished by executing the following JavaScript statement, whereby n is the relevant widget ID. Unless you have more than one reCAPTCHA field, this value will be 0.

Code: Select all
grecaptcha.reset(n);
thank you cheesy!!!!
Thanks man!
I followed the instructions and get this error when I visit the site:

Warning: require_once(K_ADDONS_DIRrecaptcha/config.php): failed to open stream: No such file or directory in /webroot/u/l/ultim019/msds/www/cms/addons/recaptcha/recaptcha.php on line 5 Fatal error: require_once(): Failed opening required 'K_ADDONS_DIRrecaptcha/config.php' (include_path='.:/usr/share/pear:/usr/share/php53/pear') in /webroot/u/l/ultim019/msds/www/cms/addons/recaptcha/recaptcha.php on line 5
@tonjaggart, please correct me if I am wrong but, from the error message, it appears that you are not using Couch v2.0.
Could you please verify?
That is correct. I downloaded the addon from GitHub because I am not able to upgrade the site just yet, but wanted to get the Google reCAPTCHA on the site.
Change
Code: Select all
require_once( K_ADDONS_DIR . 'recaptcha/config.php' );
to
Code: Select all
require_once( K_COUCH_DIR . 'addons/recaptcha/config.php' );
Now I am seeing this error. Do I need to update something in the recaptcha.php file?

Warning: require_once(K_ADDONS_DIRrecaptcha/config.php): failed to open stream: No such file or directory in /webroot/u/l/ultim019/msds/www/cms/addons/recaptcha/recaptcha.php on line 5 Fatal error: require_once(): Failed opening required 'K_ADDONS_DIRrecaptcha/config.php' (include_path='.:/usr/share/pear:/usr/share/php53/pear') in /webroot/u/l/ultim019/msds/www/cms/addons/recaptcha/recaptcha.php on line 5
I updated line 5 to:
Code: Select all
require_once( K_ADDONS_DIR . 'addons/recaptcha/config.php' );


Still seems to throw an error.
tonjaggart wrote: I updated line 5 to:
Code: Select all
require_once( K_ADDONS_DIR . 'addons/recaptcha/config.php' );


Still seems to throw an error.


Please note Cheesypoof's above reply:

Code: Select all
require_once( K_COUCH_DIR . 'addons/recaptcha/config.php' );
Image
12 posts Page 1 of 2

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 2 guests