Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
Salieri
Hangin' Around



Joined: Nov 07, 2003
Posts: 33

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

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

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

The standard login block that comes with nuke is based around this code
Code:
1.   $content = "<form action=\"account.html\" 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
Raven







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

BTW, your email address is being rejected as a mailbox not available. Please check your profile and correct the email address. Thanks!
 
Salieri







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

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
 
Salieri







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

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
 
Salieri







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

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?
 
sixonetonoffun
Spouse Contemplates Divorce



Joined: Jan 02, 2003
Posts: 2496

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

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    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

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 ©