Changeset 3028
- Timestamp:
- 07/10/2008 08:33:05 AM (3 months ago)
- Location:
- trunk/system
- Files:
-
- 1 added
- 3 modified
-
config/captcha.php (modified) (1 diff)
-
i18n/en_US/captcha.php (modified) (1 diff)
-
libraries/drivers/Captcha/Basic.php (modified) (1 diff)
-
libraries/drivers/Captcha/Word.php (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/config/captcha.php
r3024 r3028 8 8 * 9 9 * Group Options: 10 * style - Captcha type, e.g. basic, math, riddle10 * style - Captcha type, e.g. basic, word, math, riddle 11 11 * width - Width of the Captcha image 12 12 * height - Height of the Captcha image 13 * complexity - Difficulty of the Captcha, concreteusage depends on chosen style13 * complexity - Difficulty level (0-10), usage depends on chosen style 14 14 * background_path - Path to folder in which background image reside 15 15 * background_file - Image file name -
trunk/system/i18n/en_US/captcha.php
r2753 r3028 5 5 'file_not_found' => 'The specified file, %s, was not found. Please verify that files exist by using file_exists() before using them.', 6 6 'requires_GD2' => 'The Captcha library requires GD2 with FreeType support. Please see http://php.net/gd_info for more information.', 7 8 // Words of varying length for the Captcha_Word_Driver to pick from 9 // Note: use only alphanumeric characters 10 'words' => array 11 ( 12 'cd', 'tv', 'it', 'to', 'be', 'or', 13 'sun', 'car', 'dog', 'bed', 'kid', 'egg', 14 'bike', 'tree', 'bath', 'roof', 'road', 'hair', 15 'hello', 'world', 'earth', 'beard', 'chess', 'water', 16 'barber', 'bakery', 'banana', 'market', 'purple', 'writer', 17 'america', 'release', 'playing', 'working', 'foreign', 'general', 18 'aircraft', 'computer', 'laughter', 'alphabet', 'kangaroo', 'spelling', 19 'architect', 'president', 'cockroach', 'encounter', 'terrorism', 'cylinders', 20 ), 7 21 ); -
trunk/system/libraries/drivers/Captcha/Basic.php
r3027 r3028 47 47 48 48 // Calculate character font-size and spacing 49 $default_size = min(Captcha::$config['width'], Captcha::$config['height'] * 2) / strlen(Captcha::$answer);49 $default_size = min(Captcha::$config['width'], Captcha::$config['height'] * 2) / (strlen(Captcha::$answer) + 1); 50 50 $spacing = (int) (Captcha::$config['width'] * 0.9 / strlen(Captcha::$answer)); 51 51
