How to use and customize the CAPTCHA spam protection

To enable the CAPTCHA, log in and go to Admin --> Spam protection. There you can enable the CAPTCHA for the posting form, the contact form and the register form. For each form you have the possibility to choose a mathematical or a graphical CAPTCHA.

Mathematical CAPTCHA

If the mathematical CAPTCHA is enabled, unregistered users are asked to enter the result of a simple calculation in order to submit the form. This looks something like this:

mathematical CAPTCHA

By default, the range of the two numbers to add is between 0 and 10 and 1 and 10 (this excepts 0 to be a valid result because string inputs are converted into 0 by the intval function). This keeps the calculation simple but the probability solving it randomly is only 1:20. You can increase the range of the two numbers by editing modules/captcha/captcha.php (look for $number[0] = rand(1,10); $number[1] = rand(0,10);). Another idea to complicate the calculation for robots would be to replace the numbers by words. This could also be done in the template ({$captcha.number_1|replace:”1”:”one”|replace:”2”:”two”|replace...}).
The labels (like all other labels) can be modified editing the file lang/english.lang.

Graphical CAPTCHA

If the graphical CAPTCHA is enabled, unregistered users are asked to enter the letters/numbers of the shown image in order to submit the form. This looks something like this:

graphical CAPTCHA

In order to use the graphical CAPTCHA the GD Lib has to be installed on your server. Furthermore you need to copy at least one TTF font file into the directory modules/captcha/fonts. If there is more than one font, the string is generated by using all fonts randomly. You can get font files e.g. on dafont.com. You can also modify the background images in modules/captcha/backgrounds or put in additional or other background images (*.png, *.gif or *.jpg). These images will be used randomly.

Last modified: 2010-01-04, 11:36

Contact