![]() |
Querying Postbit Hook
I'm having some issues pulling this off. Its fruturating. Any suggestions?
In postbit_display_start hook Code:
global $db, $vbulletin; In postbit_legacy template I have this: Code:
$display In "test" template I have: Code:
$getthread1[title] Nothing is showing, and I have no idea why |
global $threadinfo; as well needed for $threadinfo['threadid']
or use $post[threadid] instead |
I think bananalive is correct, try $post instead of $threadinfo.
|
THanks guys, think we're good. One other thing.
What If I wanted the $display variable to only show on the first thread/post (thread starter). RIght now its showing on every single post under it... Whats the suggestion there? |
Maybe:
HTML Code:
<if condition="$post['postid']==$thread['firstpostid']"> |
I havnt tried that yet, I will. Now I have one last issue. I'm trying to display the same thing on forumdisplay. My forumdisplay query hook has:
Code:
$hook_query_fields .= ", thread_expiry"; So beneath it I'm trying to do: Code:
$thread['thread_expiry'] = vbdate($vbulletin->options['dateformat'], , $thread['thread_expiry']); |
What's with the extra comma in there?
You didn't say which hook location you are using for converting the date. That is the way you would get the date (but not the time). |
No reason for the comma..oops. For converting the data, I'm using the same hook. forumdisplay_query
Code:
$hook_query_fields .= ", thread_expiry"; then i tried putting Code:
$thread['thread_expiry'] = vbdate($vbulletin->options['dateformat'], , $thread['thread_expiry']); |
The query hook adds fields to the query that is right after it in the code. So, the field isn't available until after the query. Go find that hook in the code and then see what hook you can use after the field is available to do something to the date (threadbit_display?).
|
Lynne! Thank you!
You were right, threadbit_display was the right hook to call. It now works! Thank you so much for your help |
All times are GMT. The time now is 05:00 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:
|