Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jun 2002
Posts: 136
Member
Member
Offline
Joined: Jun 2002
Posts: 136
do you guys remember in classic where if you added a custom box in the profile you can add a string and have it show up under the username when they posted, well how can we do that with threads?

Peter

Sponsored Links
Joined: Jun 2002
Posts: 136
Member
Member
Offline
Joined: Jun 2002
Posts: 136
TTT

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
You would need to query those fields in showflat and showthreaded, then add them into the templates.

For example.... in showflat.php, find this:

// -----------------------
// Cycle through the posts
$query = "
SELECT t1.B_Number,t2.U_Username,t1.B_Posted,t1.B_IP,t1.B_Subject....

Add a comma, then t2. then the field from the users table that you want to add to the end... like this:

...,t2.U_Extra1


Then below that, where it assigns them to a variable, add a variable for the new field(s) you pulled.

Find this:

list ($Number,$Username,$Posted,$IP,$Subject....


Add a comma, then the variable into the end of the list, like this:

...$usernum,$downloads,$anonname,extra1) = $dbh -> fetch_array($sth);

Then below it, add something like this:

$postrow[$i]['Extra1'] = $extra1;


Then in the showflat.tmpl file.... where you want the info to appear, (probably below location) add this:

{$postrow[$i]['Extra1']}


Hope that made sense and helps a bit.

Joined: Jun 2002
Posts: 136
Member
Member
Offline
Joined: Jun 2002
Posts: 136
ya but how do I know what the name of extra1 is? where can i find that??

Peter

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
There are 4 or 5 extra fields available in the profiles.. you fill the names in the config file.... but in the database they are extra1, extra2 etc.....

Sponsored Links
Joined: Jun 2002
Posts: 136
Member
Member
Offline
Joined: Jun 2002
Posts: 136
I did that and it made everything in the row disappear can you lease check it over and tell me if something is wrong,

Peter

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
extra1 is used for the ICQ number by .threads

Joined: Jun 2002
Posts: 136
Member
Member
Offline
Joined: Jun 2002
Posts: 136
so then what is the first extra field that I can specify?

Peter

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
extra2 would be next.

Joined: Jun 2002
Posts: 136
Member
Member
Offline
Joined: Jun 2002
Posts: 136
still dont work when I added all this in all the info at the bottom, reg date, location, post all dissapears

Peter

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I don't have the time right now to play with this, or else I would. When I finish up with all the work I've got, if nobody's posted something, I'll take a look.

Joined: Jun 2002
Posts: 136
Member
Member
Offline
Joined: Jun 2002
Posts: 136
Ok thanks let me know when you come up with something bro

Peter


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
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
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
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 20221218)