if condition show code only in forumid in forumdiplay

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • firassalim
    Member
    • Jul 2009
    • 35
    • 3.8.x

    if condition show code only in forumid in forumdiplay

    How do I set a condition in forumdiplay template so that my code appears only in certain forum ids
    I tried this and it failed

    Code:
    ...
    $header
    $navbar
    
    [B][COLOR=Red]<if condition="in_array($forum[forumid], array(1,2,3))">
    my code
    </if>[/COLOR][/B]
    
    <if condition="$show['forumslist']">
    <!-- sub-forum list  -->
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
    <tr>
    .....
  • Loco.M
    Senior Member
    • Mar 2005
    • 4319
    • 3.5.x

    #2
    this is the vBulletin Template Conditional I used to achieve something similar for one forum. You could add more ID's, just place comma's between them.
    -- Web Developer for hire
    ---Online Marketing Tools and Articles

    Comment

    • Zachery
      Former vBulletin Support
      • Jul 2002
      • 59097

      #3
      Try adding $forum[forumid] to the template, does it show anything/.

      Comment

      • Lats
        Senior Member
        • Mar 2002
        • 3671

        #4
        Try this...
        Code:
        <if condition="in_array($foruminfo[forumid], array(X,Y,Z))">
         code
        </if>
        Lats...

        Comment

        • firassalim
          Member
          • Jul 2009
          • 35
          • 3.8.x

          #5
          Originally posted by Lats
          Try this...
          Code:
          <if condition="in_array($foruminfo[forumid], array(X,Y,Z))">
           code
          </if>
          thanks your code worked

          finally

          Comment

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