Joomla 2.5 Recaptcha
How to configure captcha (recaptcha plugin) 1. Open admin section and go to System-Global Configuration. Briefly, reCAPTCHA is a free service from Google that helps protect websites from spam and abuse. A “CAPTCHA” is a test to distinguish between humans and bots. Humans can solve it quite easily, but “bots” and other malicious software have a hard time figuring it out. Lets see how to enable and use reCAPTCHA in Joomla.
Extends JObject
Joomla! Captcha base object
abstract | |
---|---|
since | 2.5 |
Methods
__construct
Class constructor.
since | 2.5 |
---|---|
throws |
|
Arguments
string
The plugin to use.
array
Associative array of options.
_load
Load the Captcha plugin.
since | 2.5 |
---|---|
throws |
|
Arguments
array
Associative array of options.
attach

Attach an observer object
since | 2.5 |
---|
Arguments
object
An observer object to attach
checkAnswer
Checks if the answer is correct.
since | 2.5 |
---|---|
throws |
|
Arguments
string
The answer.
Response

boolean
Whether the provided answer was correct
detach
Detach an observer object
since | 2.5 |
---|
Arguments
object
An observer object to detach.
Response
boolean
True if the observer object was detached.
display
Get the HTML for the captcha.
since | 2.5 |
---|---|
throws |
|
Arguments
string
The control name.
string
The id for the control.
string
Value for the HTML class attribute

Response
mixed
The return value of the function 'onDisplay' of the selected Plugin.
getInstance
Returns the global Captcha object, only creating itif it doesn't already exist.
since | 2.5 |
---|---|
throws |
|
Arguments
string
The plugin to use.
array
Associative array of options.
Response
JoomlaCMSCaptchaCaptcha null
Instance of this class.
getState
Get the state of the Captcha object
initialise
Fire the onInit event to initialise the captcha plugin.
since | 2.5 |
---|---|
throws |
|
Arguments
string
The id of the field.
Response
boolean
True on success
setupField
Method to react on the setup of a captcha field. Gives the possibilityto change the field and/or the XML element for the field.
Arguments
JoomlaCMSFormFieldCaptchaField
Captcha field instance
SimpleXMLElement
XML form definition
Properties
_observers
An array of Observer objects to notify
Google Recaptcha 2
_state
The state of the observable object
_methods
A multi dimensional array of [function][] = key for observers
_captcha
Captcha Plugin object
_name
Editor Plugin name
_instances
Joomla 2.5 Recaptcha Mac
Array of instances of this class.
since | 2.5 |
---|
Type(s)
Joomla 2.5 Recaptcha Download
array<mixed,JoomlaCMSCaptchaCaptcha>