PDA

View Full Version : show $myvariable in postbit


mokujin
07-23-2013, 09:17 AM
Hello,
I have this query in showthread_complete hook

$noticeinfo = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "notice WHERE noticeid = 1");

Now how could I use $noticeinfo['noticeid'] and $noticeinfo['title'] to put them in postbit_legacy?

I dont want to use postbit_display_complete to run the query.

Thank you !

kh99
07-23-2013, 10:13 AM
You can't use showthread_complete if you want to use the result in the postbit, because the postbits are already created at that point. You might be able to use showthread_start, but the postbit is created inside a function, so if you try to use a global variable you would need to use $GLOBALS[variablename].

But I'm not sure why you'd want to put that result in postbit since it would be the same for every post.