The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Custom Field Apperance (hard to explain so please read)
I'm beginning new work on my forums. We have a custom field ($post[field5]) and it's applied threw the Admin CP. As you can see, it's at the bottom of the postbit (it says Stardust Executive, in bold). Now, I want to move that to one field below the avatar, and have it appear only if the person has a custom title (I was able to do that with the Online Status, it's gone unless the user is online). Now, I've been having alot of trouble. From looking at the other templates, I made a new one called 'postbit_status'. I tried including varibles $post[status], $postbit_status, and just $status. I also edited the showthread.php to get the information from that template in the varible $postbit_status, and nothing. I'm hoping there's some easy, magical way to do this in PHP Include. Please help me out.
-Eric (Note: I orginally posted this at vbt.com, but they said it needs to be hacked, like I feared....) |
#2
|
|||
|
|||
Heh, you consider it a request I see. I wouldn't have...
|
#3
|
|||
|
|||
I really hate to bump, but I really need this help.
|
#4
|
||||
|
||||
I'm not sure I understand exactly what you're asking. Do you mean that you just want the word "status" with the custom field (field5) to only appear in the postbit if the user has entered something in the field? Something like Status: $post[field5] ?
If so, thats easy enough.. In admin/functions.php find: Code:
if ($post[customtitle]==2) { $post[usertitle] = htmlspecialchars($post[usertitle]); } Code:
if ($post[field5]!="") { $status="<smallfont><b>Status:</b> $post[field5]</smallfont><br>"; } else { $status=""; } |
#5
|
||||
|
||||
Ah, I think I know what you're asking for now.. You want to call a template that contains $post[field5] along with some html (table tags) right?
If thats what you mean, instead of using the code that I posted above, use this: Code:
if ($post[field5]!="") { eval("\$status = \"".gettemplate("Your_Template_Name")."\";"); } else { $status=""; } Hope that helps. |
#6
|
|||
|
|||
YES!!! It worked! If I get your permission, can I make a hack for it (it'd be a hack on how to have tables appear only if a user has info to input, or some other crazy name)
|
#7
|
||||
|
||||
EvilLS1 - make amini hack of it, I beg you!
|
#8
|
||||
|
||||
Post it if you want but I'm pretty sure this has already been posted numerous times here in the request forum.
BTW, you guys should check out Logician's Dynamic Templates hack. It allows you to do several things like this with only template edits which makes small hacks like this one obsolete. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|