The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Template Variable Question
I have 5 different header images. 1 Global One, and 4 that I want to show on each of their respective forums.
Will vBulletin let me do that without having to make a whole new style for each forum? I'm guessing there's a way with <if> <else> tags, but I'm not sure how to go about doing that. Could anyone shed some light? |
#2
|
||||
|
||||
Code:
<if condition="in_array($GLOBALS[forumid], 5,6,7,8"> <img src="/path/to/header_$GLOBALS[forumid].gif" /> <else /> <img src="/path/to/global_header.gif" /> </if> Replace 5,6,7,8 with the Forum IDs that you'd like the specific headers displayed in. |
#3
|
|||
|
|||
Awesome, thanks man
By the way, in case any bystander stumbles upon this with the same problem, I had to modify the above code to work, it's: Code:
<if condition="in_array($GLOBALS[forumid], array(5,6,7,8))"> <img src="/path/to/header_$GLOBALS[forumid].gif" /> <else /> <img src="/path/to/global_header.gif" /> </if> |
#4
|
||||
|
||||
in array needs an array as the second variable, so 5,6,7,8 needs to be array(5,6,7,8)!
|
#5
|
||||
|
||||
Ah, I forgot the array, lol. Sorry about that.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|