![]() |
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. |
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.
|
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! |
Have you tried:
Quote:
Quote:
Quote:
|
@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?
|
*Exactly* what did you put into the SHOWTHREAD template that didn't work? $threadinfo is the correct variable.
|
Ok I am using this code in showthread -
Code:
|
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.
|
I have tried:
Code:
Posted by $threadinfo[username] on $threadinfo[dateline], $threadinfo[lastpost] Code:
Posted by $thread[username] on $thread[dateline], $thread[lastpost] |
Did you try $threadinfo[postusername] ?
|
All times are GMT. The time now is 09:28 AM. |
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:
|