| 5 | | * Configure the Captcha |
| 6 | | * Custom styles can be added by extending the Captcha class |
| | 5 | * Captcha configuration is defined in groups which allows you to easily switch |
| | 6 | * between different Captcha settings for different forms on your website. |
| | 7 | * Note: all groups inherit and overwrite the default group. |
| | 8 | * |
| | 9 | * Group Options: |
| | 10 | * style - Style driver |
| | 11 | * width - Width of the Captcha image |
| | 12 | * height - Height of the Captcha image |
| | 13 | * complexity - Difficulty of the Captcha, concrete usage depends on chosen style |
| | 14 | * background_path - Path to folder in which background image reside |
| | 15 | * background_file - Image file name |
| | 16 | * font_path - Path to folder in which fonts reside |
| | 17 | * font_file - Font file name |
| 8 | | |
| 9 | | /** |
| 10 | | * Width and height of the Captcha image. |
| 11 | | * These settings are ignored if using a background image. |
| 12 | | */ |
| 13 | | $config['width'] = 150; |
| 14 | | $config['height'] = 50; |
| 15 | | |
| 16 | | /** |
| 17 | | * Captcha style to use. Default is 'basic' and is only for testing as it |
| 18 | | * does not require any truetype fonts installed. |
| 19 | | * 'standard' is the recommended style. A font must be supplied. A background |
| 20 | | * image is optional. |
| 21 | | * 'alphasoup' is an alternative style. A font must be supplied. |
| 22 | | * 'math' is a 'solve the question' style. |
| 23 | | * A font must be supplied. A background image is optional. |
| 24 | | * Custom styles can be added easily by extending the library. |
| 25 | | */ |
| 26 | | $config['style'] = 'standard'; |
| 27 | | |
| 28 | | /** |
| 29 | | * Number of characters to use for the Captcha (4 or 5 recommended). |
| 30 | | * This setting is ignored if using style 'math'. |
| 31 | | */ |
| 32 | | $config['num_chars'] = 4; |
| 33 | | |
| 34 | | /** |
| 35 | | * Path to font files. Example: 'application/fonts/'. |
| 36 | | * If using 'standard' style, you must supply a valid truetype font file. |
| 37 | | */ |
| 38 | | $config['font_path'] = SYSPATH.'fonts/'; |
| 39 | | |
| 40 | | /** |
| 41 | | * Name of the font, with the file extension. Case sensitive. |
| 42 | | */ |
| 43 | | $config['font_name'] = 'DejaVuSerif.ttf'; |
| 44 | | |
| 45 | | /** |
| 46 | | * Background image. Example: 'application/images/pattern.jpg'. |
| 47 | | * The dimensions of this image will be used. |
| 48 | | */ |
| 49 | | $config['background_image'] = ''; |
| | 19 | $config['default'] = array |
| | 20 | ( |
| | 21 | 'style' => 'riddle', |
| | 22 | 'width' => 150, |
| | 23 | 'height' => 50, |
| | 24 | 'complexity' => 4, |
| | 25 | 'background_path' => '', |
| | 26 | 'background_file' => '', |
| | 27 | 'font_path' => SYSPATH.'fonts/', |
| | 28 | 'font_file' => 'DejaVuSerif.ttf', |
| | 29 | ); |