| Author |
Message |
Salieri Hangin' Around

Joined: Nov 07, 2003 Posts: 33
|
Posted:
Tue Mar 30, 2004 10:07 am |
|
I saw this login block over at computercops:
I thought I'd ask Raven and co. for a more responsive and friendly answer.
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.  |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Tue Mar 30, 2004 10:58 am |
|
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. |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Tue Mar 30, 2004 11:01 am |
|
BTW, your email address is being rejected as a mailbox not available. Please check your profile and correct the email address. Thanks! |
|
|
|
 |
Salieri Hangin' Around

Joined: Nov 07, 2003 Posts: 33
|
Posted:
Tue Mar 30, 2004 1:30 pm |
|
Wow! Thanks alot Raven! This means alot to me. I'll try that out now and see if it works for me.
Also I changed my email address to my new one, thanks for the heads up.
Once again thanks.
Ps. Good Luck with PHP-Portal  |
|
|
|
 |
Salieri Hangin' Around

Joined: Nov 07, 2003 Posts: 33
|
Posted:
Thu May 06, 2004 2:18 pm |
|
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.
Any ideas? Thanks again.
EDIT: no matter I fixed it myself!  |
|
|
|
 |
Salieri Hangin' Around

Joined: Nov 07, 2003 Posts: 33
|
Posted:
Sun May 09, 2004 11:35 am |
|
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: 2499
|
Posted:
Sun May 09, 2004 4:16 pm |
|
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) |
|
|
|
 |
|
|
|
|