Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Let's assume you will want the Location field to be added which corresponds to the U_Location field in the database.

Step 1. Open templates/default/newuser_signup.tmpl

1.1 Find:
Code
<br /><input type="text" name="Email" class="formboxes" /><br /><br /><br /><br /><br />

BELOW it ADD
Code
<br /><input type="text" name="Location" class="formboxes" /><br /><br /><br /><br /><br />


Step 2. Open adduser.php
2.1 Find:
Code
<br />   $Verify = get_input("Verify","post");<br />

BELOW it ADD
Code
<br />   $Location = get_input("Location","post");<br />


2.2 Find:
Code
<br />// If Displayname is blank then set it to the Loginname<br />   if (!$Displayname) {<br />      $Displayname = $Loginname;<br />   }<br />

BELOW it ADD
Code
<br />   if (!$Location) {<br />      $html -> not_right("The Location field is obligatory but was not specified",$Cat);<br />   }<br />


2.3 Find:
Code
<br />   $Color_q    = addslashes($Color);<br />

BELOW it ADD
Code
<br />   $Location_q    = addslashes($Location);<br />


2.4 Find:
Code
<br />   $query = "<br />         INSERT INTO {$config['tbprefix']}Users (U_LoginName,<br />           U_Username,U_Password,U_Email,<br />           U_Totalposts,U_Laston,U_Status,<br />           U_Sort,U_Display,U_View,<br />           U_PostsPer,U_EReplies,U_Registered,<br />           U_RegEmail,U_RegIP,U_Groups,<br />           U_Title,U_Color,U_Privates,<br />           U_Approved,U_PicturePosts)<br />         VALUES ('$Login_q',<br />           '$Displayn_q','$crypt','$Email_q',<br />           '0','$date','$Status_q',<br />           '{$theme['sort']}','$Display_q','$View_q',<br />           '{$theme['postsperpage']}','$EReplies_q','$date',<br />           '$Email_q','$ip_q','$Groups_q',<br />           '$Title_q','$Color_q','1',<br />           '$approved','$PicturePosts')<br />   "; <br />

CAHNGE it to this
Code
<br />   $query = "<br />         INSERT INTO {$config['tbprefix']}Users (U_LoginName,<br />           U_Username,U_Password,U_Email,<br />           U_Totalposts,U_Laston,U_Status,<br />           U_Sort,U_Display,U_View,<br />           U_PostsPer,U_EReplies,U_Registered,<br />           U_RegEmail,U_RegIP,U_Groups,<br />           U_Title,U_Color,U_Privates,<br />           U_Approved,U_PicturePosts,[:"red"]U_Location[/])<br />         VALUES ('$Login_q',<br />           '$Displayn_q','$crypt','$Email_q',<br />           '0','$date','$Status_q',<br />           '{$theme['sort']}','$Display_q','$View_q',<br />           '{$theme['postsperpage']}','$EReplies_q','$date',<br />           '$Email_q','$ip_q','$Groups_q',<br />           '$Title_q','$Color_q','1',<br />           '$approved','$PicturePosts',[:"red"]'$Location_q'[/])<br />   "; <br />


NOTE: Step 2.4 has been edited for length. The original is in two lines only. The alteration is highlighted in red

I hope this is what you want to do

Warm regards

Nikos


Nikos
Sponsored Links
Entire Thread
Subject Posted By Posted
Reg field compulsory Liahona_dup1 01/02/2003 4:04 AM
Re: Reg field compulsory Liahona_dup1 01/02/2003 2:41 PM
Re: Reg field compulsory dimopoulos 01/02/2003 3:34 PM
Re: Reg field compulsory Dave_L_dup1 01/02/2003 3:37 PM
Re: Reg field compulsory Liahona_dup1 01/02/2003 3:59 PM
Re: Reg field compulsory dimopoulos 01/02/2003 4:26 PM
Re: Reg field compulsory Liahona_dup1 01/02/2003 4:41 PM
Re: Reg field compulsory dimopoulos 01/02/2003 4:47 PM
Re: Reg field compulsory Liahona_dup1 01/02/2003 5:33 PM
Re: Reg field compulsory dimopoulos 01/02/2003 7:01 PM
Re: Reg field compulsory Liahona_dup1 01/02/2003 9:25 PM
Re: Reg field compulsory dimopoulos 01/02/2003 11:39 PM
Re: Reg field compulsory Liahona_dup1 01/03/2003 12:46 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)