Local Math Captcha Hack - irmtfan -
http://www.xoops.org -
http://www.xoops.ir===========================
This is a very simple hack to change the XOOPS math captcha from figures to local words to provide more protection against spams.
Example: {3} + {4} = ? will be changed to {three} + {four} = ? in english
This hack had been introduced about one year ago in XOOPS255 persian release and was completely effective in persian websites. eg: I had not one single spam in my website for more than a year while previously I had 5 or 6 daily spams.
I hope this hack will be useful in other local communities and even english websites.
Please try it and report the result in xoops.org forums.
Install
--------------------------
Just copy 2 files in this package
1- ./htdocs/class/captcha/text.php
2- ./htdocs/language/english/locale.php
Note:
--------------------------
In XOOPS255 the captcha is set to "image" by default. You should change the captcha mode to "text" in XOOPS255/class/captcha/config.php
le="color: #000000"><?php 'mode' => 'text', // default mode, you can choose 'text', 'image', 'recaptcha'(requires api key)
You can back to old figures by changing the setting in ./htdocs/language/english/locale.php
le="color: #000000"><?php define("_NUM_TYPE","word"); // you can choose "figure","word","image"
]
Translation:
----------------
You can implement this hack for your own language by:
1- Copying ./htdocs/language/english/locale.php into ./htdocs/language/YOUR_LANG/locale.php
2- Translate figures to your own language (currently you only need to translate 1-9):
le="color: #000000"><?php $_numWords = array( '0'=> '' , '1'=> 'one' , '2'=> 'two' , '3' => 'three', '4' => 'four', '5' => 'five', '6' => 'six', '7' => 'seven', '8' => 'eight', '9' => 'nine', '10' => 'ten', '11' => 'eleven', '12' => 'twelve', '13' => 'thirteen', '14' => 'fouteen', '15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen', '18' => 'eighteen', '19' => 'nineteen', '20' => 'twenty', '30' => 'thirty', '40' => 'fourty', '50' => 'fifty', '60' => 'sixty', '70' => 'seventy', '80' => 'eighty', '90' => 'ninty', '100' => 'hundred &', '1000' => 'thousand &', '1000000' => 'million', '1000000000' => 'billion');
TO DO:
---------------------
show numbers as figure images.
Download:
---------------------
http://www.jadoogaran.org/test255/local_math_captcha_hack_255_256.zip