The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Template Conditionals not working properly?
I'm trying to use the "Show in one forum" conditional, but I can't get it to work what so ever.
Example: Code:
<vb:if condition="$forum[forumid] == x">Show this if forum id is x</vb:if> With example: Code:
<vb:if condition="$forum[forumid] == 35">TEST <vb:else /> <vb:if condition="$show['newthreadlink']"><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top"><span>+</span> {vb:rawphrase post_new_thread}</a></vb:if> <vb:if condition="$show['threadslist']"></vb:if> <div class="threadpagenav"> {vb:raw pagenav} <div id="threadpagestats" class="threadpagestats">{vb:rawphrase showing_threads_x_to_y_of_z, {vb:raw limitlower}, {vb:raw limitupper}, {vb:raw totalthreads}}</div> </div> </vb:if> Am I doing something wrong, or does the code doesn't work properly? |
#2
|
|||
|
|||
Which template are you putting that in? Try this:
Code:
<vb:if condition="$GLOBALS['forumid'] == 35">TEST |
#3
|
|||
|
|||
Quote:
And thanks, that code seems to be working perfectly! Thank you. When should "$forum" be applied then? I found it in the vb4 conditional list. |
#4
|
|||
|
|||
I'm not sure offhand. The reason it seems confusing is that there really aren't any rules for what to use where, it just depends on the template (or the hook location, for a plugin), and how the vb code is written in that script.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|