![]() |
I think this has been done, but can't find it.
How do you add other info below a user's name and avatar in each post. I notice here you have the regulars Location, etc. but you also have Hacks: ## How do I add certain stuff. I'm not sure all I want to add yet, but if you could tell me and set a place for me to change with what I want, that would be great. |
You'll need to edit the 'postbit' template. Sorry I can't offer much more help, though.
|
Make a new User Profile field, call it for example:
Quote:
Then, go to postbit and add your field name, the code in your postbit will look a little like: [QUOTE] <table bgcolor="{pagebgcolor}" width="{tablewidth}" cellpadding="0" cellspacing="0" border="0"><tr><td width="10"><img width="10" height="1" src="{imagesfolder}/space.gif" alt=""></td><td width="100%"><!-- spacer --> <table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td> <table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%"> <tr> <td bgcolor="$post[backcolor]" width="175" valign="top" nowrap> <a name="post$post[postid]"></a> $post[firstnewinsert] <normalfont><b>$post[username]</b></normalfont><br> <smallfont>$post[usertitle]</smallfont><br> $post[avatar]<p> <smallfont>Registered: $post[joindate]<br> Location: $post[field2]<br> Posts: $post[posts]</smallfont><br> <smallfont><a href="moderator.php?s=$session[sessionhash]&action=points&userid=$userinfo[userid]" target=_blank>Points:</a> $post[field8]<br></smallfont> <smallfont>Style: <a href='index.php?styleid=$post[styleid]'>$post[styletitle]</a></smallfont></td> <td bgcolor="$post[backcolor]" width="100%" valign="top"> <smallfont>$post[icon] <b>$post[title]</b></smallfont> <p><normalfont>$post[message]</normalfont></p> $post[attachment] <p>$post[signature]</p> <p>$post[editedby]</p> <p align="right"><smallfont><a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report this post to a moderator</a> | $post[iplogged]</smallfont></p> </td> </tr> <tr> <td bgcolor="$post[backcolor]" width="175" height="16" nowrap><smallfont>$post[foldericon] $post[postdate] <font color="{timecolor}">$post[posttime]</font></smallfont></td> <td bgcolor="$post[backcolor]" width="100%" valign="middle" height="16"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr valign="bottom"> <td><smallfont>$onlinestatus $post[profile] $post[pmlink] $post[useremail] $post[homepage] $post[search] $post[buddy] <!-- $ post[icqicon] --> <!-- $ post[aimicon] --> <!-- $ post[yahooicon] --> </smallfont></td> <td align="right" nowrap><smallfont> <a href="editpost.php?s=$session[sessionhash]&action=editpost&postid=$post[postid]"><img src="{imagesfolder}/edit.gif" border="0" alt="Edit/Delete Message"></a> <a href="newreply.php?s=$session[sessionhash]&action=newreply&postid=$post[postid]"><img src="{imagesfolder}/quote.gif" border="0" alt="Reply w/Quote"></a> </smallfont></td> </tr> </table> </td> </tr> </table> </td></tr></table> <!-- spacer --></td><td width="10"><img width="10" height="1" src="{imagesfolder}/space.gif" alt=""></td></tr></table> [QUOTE] Just basically like that, find: Quote:
Quote:
|
Gotcha. One question. If I just want to add stuff from my custom profile fields there, can I just past
PHP Code:
PHP Code:
That would be easy. |
This looks a bit like what I was about to ask.
i have a custom field called support (football team a user supports) and I want to display that under avatar etc like what this post dicusses. Can someone just break it down a bit more basic for me as I'm struggling to follow it. |
Ok the last bit what Smallville has put works thats fine,
Does it not cause any problems to have several of these things at the side? Bandwidth/Server etc? |
youd have to edit the action also, moderator.php is basically sourcing off of the points script. Not very sure of the biography variable (ex).
|
Think I got it.
So change the ><a href="moderator.php?s=$session[sessionhash...... part to the specific link? Where do I find that specific link? |
I want to add registration number anyone know the variable for that?
Where is postbit? |
I believe the variable is $userid for their registration number. Try sending an e-mail to yourself through the admin Control Panel just to you, with the $userid variable somewhere in that. If you get the e-mail with a number in that place, it will be right.
|
heh, thanks.. Im still lost though... On implementing that.
|
Hey CoolJ, I just got this working on my site in about 10 minutes after finding this thread.
Add the field you'd like at the admin Control Panel under User Fields. Find out the profilefieldid through MySQL or by hovering the mouse over the link to edit that new field... you'll see it in the URL. Now go to Templates // Modify, expand the template list, expand the Postbit templates, edit the postbit template. Search for Posts: and change it from Posts: $post[posts]</smallfont></td> to Posts: $post[posts]<br> NewField: $post[fieldx]</smallfont></td> Note that fieldx would be field5, field21, etc, based on your profilefieldid mentioned earlier. Hope that helps. |
Hey Thanks dude.. I just saw this and got it to work instantly.
|
All times are GMT. The time now is 04:43 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|