The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Condition Question
I'm trying to do my first condition and I'm not sure if I got the code correct as it's not working. I'm thinking maybe my forum id is wrong but I don't know... This is for ad placements. The pre-loader is placed in the head (forumdisplay) like this:
Code:
<vb:if condition="$forum[forumid] == 26"><!-- AdSpeed.com Serving Code 7.9.4 for 3 zones [Any Dimension] --> <script type="text/javascript" src="http://g.adspeed.net/ad.php?do=js&zids=26302x9&wd=-1&ht=-1&target=_top"></script> <!-- AdSpeed.com End --></vb:if> Code:
<vb:if condition="$forum[forumid] == 26"> <div id="banner-column-container"> <div class="banner-ads-long"> <script type="text/javascript"> AdSpeed_display(26302,0); // first ad </script> </div><!--banner-ads-long--> <div class="banner-ads-long"> <script type="text/javascript"> AdSpeed_display(26302,1); // 2nd ad </script> </div><!--banner-ads-long--> ETC... </div><!--banner-column-container--> </vb:if> Thanks! |
#2
|
||||
|
||||
You said this is in the FORUMDISPLAY template, so take a look at that template. When you do, you'll see the variable $forum is not used there, but instead the variable is called $foruminfo. So, use that variable instead.
|
#3
|
||||
|
||||
And also, 26 was correct. You don't use the SEO'd forum name. Just the ID number.
|
#4
|
|||
|
|||
Awesome, thanks for the help everybody. Works : )
--------------- Added [DATE]1293303855[/DATE] at [TIME]1293303855[/TIME] --------------- I can't find this condition. Is there such? I've found everything but it seems... "Show in every forum but these: (multiple forums)" |
#5
|
||||
|
||||
HTML Code:
<vb:if condition="!in_array($foruminfo['forumid'], array(x, y, z))">stuff</vb:if> |
#6
|
|||
|
|||
that was a no-go for me...
|
#7
|
||||
|
||||
Same or different template?
|
#8
|
|||
|
|||
Same
|
#9
|
||||
|
||||
Exactly what do you have entered and exactly where in the FORUMDISPLAY template is it entered (show us the code from three lines before to three lines after the beginning if and ending if). And, what is the result?
|
#10
|
|||
|
|||
Sorry Lynne. Your code looked just like mine from the other thread so I thought you just changed the "foruminfo" part. Upon closer inspection I found a few little 's and )'s that were different.
All works fine now. These preset conditionals are actually pretty bad @$$. Just gotta keep learning them I guess... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|