The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help getting variables in showthread template
Hi there
I need help getting the posted by username / time / date variables in the showthread template. I can access all of these variables in the postbits template by using the following vaiables - > $post[username] > $post[posttime] > $post[postdate] I need to access these variables in the showthread template - can anybody help? thanks in advance. |
#2
|
|||
|
|||
I'm not sure what you mean. There's only one post associated with each use of the postbit template, but there may be many posts on the showthread page.
|
#3
|
|||
|
|||
Well I have a title block in the showthread template, where I would like to display the posters username, the time of the post and the post date. I know the variables above are post specific, but is there a way of getting the initial post information (first post in list) into the showthread template? Does VB have standard variables for this like $thread[posted_by] / $thread[posted_time] ect?
Thanks in advance! |
#4
|
||||
|
||||
Have you tried:
Quote:
Quote:
Quote:
|
#5
|
|||
|
|||
@Boofo I tried all the the above and none of those variables worked in the showthread template.. I use $thread[title] to pick up the title of the thread so I can't understand why other $thread[] variables don't work! Do you think a hack would be needed?
|
#6
|
||||
|
||||
*Exactly* what did you put into the SHOWTHREAD template that didn't work? $threadinfo is the correct variable.
|
#7
|
|||
|
|||
Ok I am using this code in showthread -
Code:
<div id="page_title"> <h1>$thread[title]</h1> </div> <div class="secondary_info"> <span class="the_post_date">Posted by $threadinfo[username] on <if condition="!$show['announcement']"> $threadinfo[postdate]<if condition="!$show['detailedtime']">, $threadinfo[posttime]</if> <else /> <phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase> </if> / <b>37 replies</b></span> <span class="facebookBut"> <fb:like href="#" layout="button_count" show_faces="false" width="350" action="recommend" font="tahoma" class="fb_like_but"></fb:like> </span> </div> |
#8
|
||||
|
||||
As already explained, $post will NOT work in the SHOWTHREAD template. You will need to use $thread or $threadinfo. Also, take a look at the thread table to find out what the variable names are. postdate is not a field in the thread table - dateline is the field that holds the first post date and lastpost is the field that holds the last post date.
|
#9
|
|||
|
|||
I have tried:
Code:
Posted by $threadinfo[username] on $threadinfo[dateline], $threadinfo[lastpost] Code:
Posted by $thread[username] on $thread[dateline], $thread[lastpost] |
#10
|
|||
|
|||
Did you try $threadinfo[postusername] ?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|