CAPTCHA objects.
Default captcha is stored in 'sys_captcha_default' setting option.
Creating the Captcha object:
Add record to 'sys_objects_captcha' table:
- object: name of the captcha object, in the format: vendor prefix, underscore, module prefix, underscore, internal identifier or nothing; for example: bx_blogs - custom captcha in blogs module.
- title: captcha title.
- override_class_name: user defined class name which is derived from one of base captcha classes.
- override_class_file: the location of the user defined class, leave it empty if class is located in system folders.
Example of usage
Display captcha:
if ($oCaptcha)
echo $oCaptcha->display ();
Check captcha:
if ($oCaptcha && $oCaptcha->check ())
echo 'captcha is OK';
else
echo 'captcha is incorrect';