PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  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
Salieri
Hangin' Around


Joined: Nov 07, 2003
Posts: 33

PostPosted: Tue Mar 30, 2004 10:07 am Reply with quote Back to top

I saw this login block over at computercops:

Image

I thought I'd ask Raven and co. for a more responsive and friendly answer. Very Happy

Could someone tell me how to make my block have text areas wider and a shorter number in the security code like this? (So pretty much how do you mod the block so it's exactly like the CC one)

Any help is Greatly appreciated,

Sal. Smile
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Tue Mar 30, 2004 10:58 am Reply with quote Back to top

The standard login block that comes with nuke is based around this code
Code:
1.   $content = "<form action=\"modules.php?name=Your_Account\" method=\"post\">";
2.   $content .= "<center><font class=\"content\">"._NICKNAME."<br>";
3.   $content .= "<input type=\"text\" name=\"username\" size=\"10\" maxlength=\"25\"><br>";
4.   $content .= ""._PASSWORD."<br>";
5.   $content .= "<input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"20\"><br>";
6.   if (extension_loaded("gd") AND ($gfx_chk == 2 OR $gfx_chk == 4 OR $gfx_chk == 5 OR $gfx_chk == 7)) {
7.       $content .= ""._SECURITYCODE.": <img src='modules.php?name=Your_Account&op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'><br>\n";
8.       $content .= ""._TYPESECCODE."<br><input type=\"text\" NAME=\"gfx_check\" SIZE=\"7\" MAXLENGTH=\"6\">\n";
9.       $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\"><br>\n";
10.   } else {
11.       $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">";
12.       $content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">";
13.   }
14.   $content .= "<input type=\"hidden\" name=\"op\" value=\"login\">";
15.   $content .= "<input type=\"submit\" value=\""._LOGIN."\"></font></center></form>";
16.   $content .= "<center><font class=\"content\">"._ASREGISTERED."</font></center>";

I have added the line numbers for reference and clarity.

If I am understanding you correctly, the wider text areas are controlled by lines 3 and 5. The html "size" attribute controls the width of the text box and the "maxlength" attribute regulates the number of characters allowed to be entered.

Now the security code is a bit trickier. Line 8 has the same attributes but those only control the appearance. You will need to change the maxlength from 6 to 4. Then, in Your_Account/index.php you will need to make the same change in the main() function from
Code:
title='"._SECURITYCODE."'></td></tr>\n"
          ."<tr><td colspan='2'>"._TYPESECCODE.": <input type=\"text\" NAME=\"gfx_check\" SIZE=\"7\" MAXLENGTH=\"6\"></td></tr>\n"
to
Code:
title='"._SECURITYCODE."'></td></tr>\n"
          ."<tr><td colspan='2'>"._TYPESECCODE.": <input type=\"text\" NAME=\"gfx_check\" SIZE=\"7\" MAXLENGTH=\"4\"></td></tr>\n"
and in function gfx() change this code
Code:
$code = substr($rcode, 2, 6);
to
Code:
$code = substr($rcode, 2, 4);

I am trying to recall from memory but I believe that is all that is required. Make backups before you start these changes and let me know if this works or not.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Tue Mar 30, 2004 11:01 am Reply with quote Back to top

BTW, your email address is being rejected as a mailbox not available. Please check your profile and correct the email address. Thanks!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Salieri
Hangin' Around


Joined: Nov 07, 2003
Posts: 33

PostPosted: Tue Mar 30, 2004 1:30 pm Reply with quote Back to top

Wow! Thanks alot Raven! This means alot to me. I'll try that out now and see if it works for me. Very Happy

Also I changed my email address to my new one, thanks for the heads up.

Once again thanks.

Ps. Good Luck with PHP-Portal Wink
View user's profile Send private message
Salieri
Hangin' Around


Joined: Nov 07, 2003
Posts: 33

PostPosted: Thu May 06, 2004 2:18 pm Reply with quote Back to top

I applied these changes to a test site a little while ago, I did not alter the security code but was just seeing if the text areas changed, they didn't. Sad

Any ideas? Thanks again. Very Happy
EDIT: no matter I fixed it myself! Surprised Laughing Cool
View user's profile Send private message
Salieri
Hangin' Around


Joined: Nov 07, 2003
Posts: 33

PostPosted: Sun May 09, 2004 11:35 am Reply with quote Back to top

How would I go about alligning the text boxes and login button to the left?

Also, how do you increase the size of the text boxes vertically?
View user's profile Send private message
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2499

PostPosted: Sun May 09, 2004 4:16 pm Reply with quote Back to top

Start with removing the <center> tags. See what you get then. There aren't any container tags the way it looks so you might have to use a <div align='left'> or put the whole works into a table and use <td align for each line to get them where you want. Its kind of pranky and I'd imagine thats why its left as sloppy as it is. Easiest is probably to put each line into its own <div or pair of lines how ever you want it to be.

Trash all that you'll have to use a table and or css style to control the height for the text boxes. (Div can be tweaked via a style)
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