Author |
Message |
horrorcode
Involved
![Involved Involved](modules/Forums/images/ranks/4stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jan 17, 2009
Posts: 272
Location: Missouri
|
Posted:
Mon Mar 16, 2009 8:05 pm |
|
Just wondering how to change the size of the security code that appears, in lets say, the user info block?
I already figured out how to change certain aspects in the class.php-captcha.php, but when it comes down to it how would I change it to display only size=small? Would that have to be changed in the block somehow?
Also, is that the right file name?
Im sure I've missed something |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Wed Mar 18, 2009 10:39 am |
|
All the settings are in that file. What specifically do you need to do? Increase the font size?
If you increase the font size just remember that you may also have to change the maximum number of code 'characters' to stop them disappearing off the edge of the box. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
horrorcode
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Mar 18, 2009 12:53 pm |
|
Thanks for responding.
What Im having problems with is changing the number of characters displayed.
By default it shows 5 and Id like it to only show 4.
So instead of showing abcde it would show abcd |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
floppydrivez
Involved
![Involved Involved](modules/Forums/images/ranks/4stars.gif)
![](modules/Forums/images/avatars/d861f25a45009755975f0.gif)
Joined: Feb 26, 2006
Posts: 340
Location: Jackson, Mississippi
|
Posted:
Wed Mar 18, 2009 1:09 pm |
|
See post below, sorry. |
Last edited by floppydrivez on Wed Mar 18, 2009 2:06 pm; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
floppydrivez
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Mar 18, 2009 1:15 pm |
|
Hmm.. The only way I could get it to work was in images/captcha.php
Find
Code: case 'normal':
$width = 140;
$height = 60;
$length = 5;
break;
case 'large':
$width = 200;
$height = 60;
$length = 6;
break;
case 'small':
$width = 100;
$height = 30;
$length = 4;
break;
|
Change To
Code: case 'normal':
$width = 140;
$height = 60;
$length = 4;
break;
case 'large':
$width = 200;
$height = 60;
$length = 4;
break;
case 'small':
$width = 100;
$height = 30;
$length = 4;
break;
|
Maybe an easier way, I am just poking around. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
horrorcode
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Mar 18, 2009 2:02 pm |
|
Thanks for that, for now thats an easy enough change. Maybe this functionality just wasnt expanded upon?
Right above case I see:
Code:$size = (isset($_GET['size'])) ? $_GET['size'] : 'normal';
|
Tried changing that to small, but it doesnt work there. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Mar 18, 2009 2:06 pm |
|
You can do it in captcha.php but the best way IMHO is to do it in the file that creates the image;
includes/class.php-captcha.php
Code:
// class defaults - change to effect globally
define('CAPTCHA_SESSION_ID', 'php_captcha');
define('CAPTCHA_WIDTH', 250); // max 500px
define('CAPTCHA_HEIGHT', 40); // max 200px
define('CAPTCHA_NUM_CHARS', 5); // number of characters to display
define('CAPTCHA_NUM_LINES', 70); / number of interference lines
define('CAPTCHA_CHAR_SHADOW', false);
define('CAPTCHA_OWNER_TEXT', '');
define('CAPTCHA_CHAR_SET', ''); // defaults to A-Z
define('CAPTCHA_CASE_INSENSITIVE', false);
define('CAPTCHA_BACKGROUND_IMAGES', '');
define('CAPTCHA_MIN_FONT_SIZE', 12); //character minimum font size
define('CAPTCHA_MAX_FONT_SIZE', 16); // as above but max size
define('CAPTCHA_USE_COLOUR', true);
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
floppydrivez
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Mar 18, 2009 2:08 pm |
|
Any further exploration on this is prolly best left up to people who know what they are talking about.
It sorta just sparked my interest. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
horrorcode
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Mar 18, 2009 2:23 pm |
|
define('CAPTCHA_NUM_CHARS', 5); // number of characters to display
That line doesnt work, not sure why but I had tried that already.
Mine is this:
Code:
define('CAPTCHA_NUM_CHARS', 4);
define('CAPTCHA_NUM_LINES', 0);
|
It works by changing it in captcha.php, though, maybe this is an issue on my end? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
horrorcode
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Mar 24, 2009 11:26 pm |
|
Just wondering if anyones had the time to test this? Could be something went wrong when I upgraded, not sure how but the possibility cant be excluded. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
phantomj
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Oct 17, 2009
Posts: 1
Location: USA, Florida
|
Posted:
Sun Nov 01, 2009 7:50 pm |
|
For anyone who like me who has a headache over this simple question,
Make sure you also change your Block code to reflect the changes. For instance, the block-login.php file around line 39 is set to 'stacked' by default. Change this to 'small' and you have your small Captcha window.
Having it any larger than small screws up my theme by making the blocks mis-align. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Doulos
Life Cycles Becoming CPU Cycles
![](modules/Forums/images/avatars/181553f049aa2a5924cda.jpg)
Joined: Jun 06, 2005
Posts: 732
|
Posted:
Mon Nov 09, 2009 7:35 pm |
|
No matter what changes I make to either file makes any difference in the captcha image. It is small 4 characters and not color.
Oops, sorry I didn't notice this was not in the RN2.4 forums. I want to change the size of the captcha image in RN2.4 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|