The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Help in writing SQL query
EDIT: Now I would like to do this in vB 3.6 (last post).
I would like to have a bit of code in the showthread.php file and showthread template to accomplish the following task: I'd like to have different information shown in the header depending on what forumid is being viewed. I've currently accomplished this in vB 3.x using <if> conditionals in the showthread tempalte, but this is making the showthread template VERY long and I've seen a few random errors since I've implemented it that I think may be attributable to the length of the showthread template. What I'd rather do is have the query pull the results of the DB depending on what forumid is being shown and pass them into the template using a variable. I'm not sure how to write the query and such. I will only have two fields in the table, forumid and content. I'd like it such that if the forumid being viewed on the showthread.php page is equal to one that is in the table it shows that defined content. If there is no match, I'd like it such that the query returned some default row from the table. If you're curious as to what I'm really trying to do, have a look at my forums. On this page, you can see the header information (which is inserted by the showthread template) has information on books for the 70-292 exam: http://www.mcseworld.com/forums/showthread.php?t=12495 On this one, it has information on books for the 70-296 exam: http://www.mcseworld.com/forums/showthread.php?t=12522 And so forth. Like I mentioned previously, this is currently being done by a rather large chunk of HTML with conditionals in the showthread template. Here is an example of that for one of the forums: PHP Code:
Thanks in advance. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|