This plugin integrates reCaptcha into Joomla 1.5 and should also can be used in J1.0 (not tested). I know, better updating to newer Joomla versions, but there are some existing J1.5 sites, which may find this usefull to prevent SPAM. The plugin is based on https://code.google.com/p/joomla-recaptcha/.
January 2018: Updated to reCaptcha v2, support for v1 will be turned off on March 31, 2018
- https://www.milkycode.com
- Like us on Facebook: https://www.facebook.com/milkycode
Install via the standard Joomla installer.
In order to properly use Recaptcha, you will need to create an account at the recaptcha site. Once you have finished, copy the public and private keys for your site and then visit the Joomla Administrator.
- Go to Extensions > Plugin Manager
- Click the System - Recaptcha plugin.
- Go to Mambots > Site Mambots.
- Click the System - Recaptcha plugin (you may have to go the last page)
The parameters on the right provide textfields for the public and private keys.
Ajax mode is enabled by default. It helps avoid problems with "Operation Aborted" errors in IE6 and IE7. You can try to change it to Off and see what happens.
Automatically adds recaptcha to the default contact page. Can be deactivated in plugin settings.
In order to add a captcha to the Contact page in Joomla 1.0, you must add an event in your template file. The 1.0 implementation depends on a custom event 'onTemplateDisplay'. If you would like a captcha on a standard Joomla contact page, you must first enable the feature in the plugin parameters, and then add the following line at the beginning of your templates index.php file:
<?php $_MAMBOTS->trigger('onTemplateDisplay'); ?>
The Recaptcha plugin can be used in your own components easily. The only requirement is that the plugin is installed and enabled.
The API is exposed through a singleton object, 'ReCaptcha'. The processing happens automatically, so all that you need to do as a programmer is access its properties. All properties are accessed through the get method.
This method must be called statically. An example would be:
ReCaptcha::get('html');
The html string to add to your form.
A boolean that indicates whether or not the form which the ReCaptcha is in has been submitted.
A boolean that indicates if the user entered the phrase correctly.
// inside you form (e.g. registration.html.php):
<?php echo ReCaptcha?::get('html'); ?>
// Then your registration.php use the following near the top of your save() function;
if (ReCaptcha::get('submitted')) {
if (!ReCaptcha::get('success')) {
echo '<p>The Captcha was entered incorrectly. Please try again.</p>';
return;
}
}