Contact section of Joomla! 1.5 using SecurityImages 5.0
SecurityImages BETA will be available in no more than 2 days…
Note that SecurityImages is still WAY to intrusive toward #Joomla! as core file has to be changed in order to use Captcha.
Lets take the contact section of #Joomla! as an example.
- Download the patch HERE (soon available as a ready to use patch) and overwrite file on your server OR
- Do it on your own, this is more for 3rd party developer, or people wanting to understand the internal of #Joomla! or SecurityImages
Click Read MORE!
It is always recommended to use a switch in all your component to activate deactivate SecurityImages per components through the administrator control panel.
This is done by adding to administrator/components/com_contact/contact_items.xml the following code:
<param name="useSecurityImages" type="radio" default="1" label="Use SecurityImage Captcha" description="Enable Captcha verification">
Joomla will read this xml file on the fly and build the graphical user interface for the contact settings.
Since Joomla! 1.5 now use a Model View Controller paradigm, we have to alter the controller, and add a new Task displaySecurityImagesCaptcha()in components/com_contact/controller.php:
As you can see, the event “onSecurityImagesDisplay” is triggered on a per contact name basis. That mean that some contact can have a Captcha while other have not.
The next step is to add the task checkSecurityImagesCaptcha() checking the captcha in the components/com_contact/controller.php
One more step is to alter the original submit() method of the controller in components/com_contact/controller.php
And finally altering the view /com_contact/views/contact/tmpl/default_form.php
to display the Captcha field
As you see a lot of thing have been done, and I am still testing and improving the code.