Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.30.01 RN All Other Issues
Author Message
horrorcode
Involved
Involved



Joined: Jan 17, 2009
Posts: 272
Location: Missouri

PostPosted: Mon Mar 16, 2009 8:05 pm Reply with quote

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
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Wed Mar 18, 2009 10:39 am Reply with quote

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.
 
View user's profile Send private message Send e-mail
horrorcode







PostPosted: Wed Mar 18, 2009 12:53 pm Reply with quote

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
 
floppydrivez
Involved
Involved



Joined: Feb 26, 2006
Posts: 340
Location: Jackson, Mississippi

PostPosted: Wed Mar 18, 2009 1:09 pm Reply with quote

See post below, sorry.


Last edited by floppydrivez on Wed Mar 18, 2009 2:06 pm; edited 1 time in total 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
floppydrivez







PostPosted: Wed Mar 18, 2009 1:15 pm Reply with quote

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.
 
horrorcode







PostPosted: Wed Mar 18, 2009 2:02 pm Reply with quote

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.
 
Guardian2003







PostPosted: Wed Mar 18, 2009 2:06 pm Reply with quote

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);
 
floppydrivez







PostPosted: Wed Mar 18, 2009 2:08 pm Reply with quote

Any further exploration on this is prolly best left up to people who know what they are talking about. Dance-Y

It sorta just sparked my interest.
 
horrorcode







PostPosted: Wed Mar 18, 2009 2:23 pm Reply with quote

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?
 
horrorcode







PostPosted: Tue Mar 24, 2009 11:26 pm Reply with quote

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.
 
phantomj
New Member
New Member



Joined: Oct 17, 2009
Posts: 1
Location: USA, Florida

PostPosted: Sun Nov 01, 2009 7:50 pm Reply with quote

For anyone who like me who has a Neutral headache Neutral 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.
 
View user's profile Send private message
Doulos
Life Cycles Becoming CPU Cycles



Joined: Jun 06, 2005
Posts: 732

PostPosted: Mon Nov 09, 2009 7:35 pm Reply with quote

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
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.30.01 RN All Other Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©