PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
horrorcode
Involved
Involved


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

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

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 Visit poster's website MSN Messenger
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6300
Location: Vsetin, Czech Republic

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

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 Visit poster's website
horrorcode
Involved
Involved


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

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

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
View user's profile Send private message Visit poster's website MSN Messenger
floppydrivez
Involved
Involved


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

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

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


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

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

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.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
horrorcode
Involved
Involved


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

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

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.
View user's profile Send private message Visit poster's website MSN Messenger
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6300
Location: Vsetin, Czech Republic

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

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);
View user's profile Send private message Send e-mail Visit poster's website
floppydrivez
Involved
Involved


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

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

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.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
horrorcode
Involved
Involved


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

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

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?
View user's profile Send private message Visit poster's website MSN Messenger
horrorcode
Involved
Involved


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

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

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.
View user's profile Send private message Visit poster's website MSN Messenger
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 Back to top

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: 535

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

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

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum