Форумы / Cotonti / Extensions / CAPTCHA

Making a decision on the use of CAPTCHA

esclkm
#1 28.03.2009 20:05
After a lengthy discussion with Trustmaster the following solution on the CAPTCHA use was worked out.
The idea is to lighten all plugins utilizing CAPTCHA, except CAPTCHA plugins themselves by declaring
functions XXXcaptcha_validate() and XXXcaptcha_generate() in the CAPTCHA plugin and including them in the standard $sed_captcha_validate and $sed_captcha_generate arrays.
The functions shall be used in the client plugin as follows:
function sed_captcha_validate($func_index = 0)
{
 global $sed_captcha_validate;
 if(!empty($sed_captcha_validate[$func_index]))
 {
  return $sed_captcha_validate[$func_index]();
 }
 else
 {
  return TRUE; // no captcha found, bypass
 }
}
(similar for generate)
Your opinions on this solution, alternative solutions and suggestions are welcome.
littledev.ru - мой маленький зарождающийся блог о котонти.
снижение стоимости программирования и снижение стоимости производства разные вещи. Первое можно скорее сравнить с раздачей работникам дешевых инструментов, чем со снижением зарплаты