The Arcive of vBulletin Modifications Site. |
|
Get threadid in forumdisplay Details »»
|
|||||||||||||||||||||||||
HI everybody,
I have to do a mod for my board, but i've one problem: i would like to insert an image dinamically under the thread name starter.The different images are chosen if a record in one table are set to value "1" or to value "2". To see this value i have to do 1 query to db :cheeky: , and the value 1 or 2 are stored for each thread in forum....so i have to do some like this PHP Code:
I think that this variable is evaluated in forumdisplay.php inside a while loop that generates all the info needed to display each row for the catecorized forums when foromdisplay is called. So, inside this loop you have $forum[forumid] stating the current forum proccessed in cache and maybe $thread[threadid] variable... In this discussion https://vborg.vbsupport.ru/showthrea...threadid=55783 there is a query that perhaps is good for my problem and is PHP Code:
Helps is much appreciate! thanks kaiser :classic: PS= sorry for my bad english i'm working on it Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Sorry, maybe i had to post this in "help me finish" forum.If some mod can move this plz....
tnx |
|
#3
|
||||
|
||||
moved for ya
|
|
#4
|
||||
|
||||
|
Just use $tid (you defined the threadid in there already) and don't run a query in the loop please, like the way you plan it now... you will endup with "295" queries (or less
) performed on the forumdisplay page.
|
![]() |
|
|