Announcement

Collapse
No announcement yet.

Template conditionals

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] Template conditionals

    Can anyone give me the code I would need to use if I wanted to have in one of my ad placement templates, a conditional that would allow me to place my adsense in certain forum ids, but adbrite in other forum ids. Also how could I also place the adsense code on my front page at the same time I sense that an if, elseif, and else is needed, but I'm a bit thick and don't know how to do it...using vb 4.1.10

  • #2
    You would better to ask questions like these at http://www.vbulletin.org/forum/

    Here is an article about vb4 template conditionals:
    http://www.vbulletin.org/forum/showthread.php?t=231525

    Here is the code:
    HTML Code:
    <vb:if condition="in_array($forum['forumid'], array(1,2,3))">
    Show adbrite for forum 1, 2 and 3
    <vb:elseif condition="in_array($forum['forumid'], array(4,5,6))" />
    Show adsense for forum 4, 5 and 6
    </vb:if>
    You can use more than one 'else', also you can use !in_array which means not in these forums..
    Note: this will not work in all templates plus any customizations considered as not supported.
    Please feel free to contact me if you have any questions or concerns

    Links: vBulletin Manual - Code Documentation - FAQ - Bug Tracker - Lemon Juice
    vBulletin 5 Connect: Extensions - Articles - Features - Purchases

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X