The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
custom code in vanbar based on forum id
I have several forums where I'd like to display a certain graphic under the navbar for specific forum id's.
how can this be done? I'm sure it's possible I just don't know how. thanks in advance. |
#2
|
||||
|
||||
for forum 1, use an image like "myimage1.png" and for forum 2, use "myimage2.png", etc. Then you can just change the 1,2 in the image name depending on the forumid.
|
#3
|
|||
|
|||
Quote:
can I write this? <if condition $foruminfo[forumid] = 'n'> some statements </if> --------------- Added [DATE]1338326940[/DATE] at [TIME]1338326940[/TIME] --------------- Quote:
can I write this? <if condition $foruminfo[forumid] = 'n'> some statements </if> |
#4
|
||||
|
||||
No, just write:
HTML Code:
<vb:if condition="in_array($forum[forumid], array(x,y,z))"> <img src="myimage{vb:raw forum.forumid}" alt="" /> </vb:if> |
#5
|
||||
|
||||
Hi Lynne, you're lost in vb4
try HTML Code:
<if condition=""in_array($forum[forumid], array(x,y,z))"> <img src="myimage"+$forum[forumid] alt="" /> </if> |
#6
|
|||
|
|||
I'm on vb 3.84 - I did find that this work fine for me also.
<if condition="$foruminfo['forumid'] == 55"> <h1>this is a test</h1> </if> |
#7
|
||||
|
||||
That will work but you wanted to call an image not just show text, if you name your images whateverxx where xx would be the forumid that they would show for my code (and indeed Lynnes for VB4) should display the right image for the right forum.
|
#8
|
|||
|
|||
thanks simon - my basic challange is that on certain forums I need to display one graphic at the top - on all other forums I need to include from google code that display s a banner ad from google.
so I'm having a little trouble with the structure of the code to test for multiple forum id and display a unique graphic for each of the 'special' forum id's ELSE display the google ad. --------------- Added [DATE]1338390824[/DATE] at [TIME]1338390824[/TIME] --------------- My guess is that I am face with this code. <if condition="$foruminfo['forumid'] == 55"> display image1 else <if condition="$foruminfo['forumid'] == 155"> display image2 else <if condition="$foruminfo['forumid'] == 159"> display image3 else insert my google ad code here. |
#9
|
||||
|
||||
It would be
HTML Code:
<if condition="$foruminfo['forumid'] == 55"> <img src="/mypicturepath/mypic1" /></if> <else /> <if condition="$foruminfo['forumid'] == 155"> <img src="/mypicturepath/mypic2" /></if> <else /> <if condition="$foruminfo['forumid'] == 159">....etc </if> |
#10
|
|||
|
|||
mucho gracias!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|