Certain banner in certain forum?

Discussion in 'vBulletin Discussions' started by BabyDesigner, Nov 23, 2009.

  1. BabyDesigner

    BabyDesigner Adept

    Joined:
    Aug 24, 2009
    Messages:
    246
    Likes Received:
    6
    First Name:
    Meg
    Hey
    Some one has asked me if they could sponsor a specific forum I have on Tots-n-Tums. By supporting this specific forum they want me to put a banner in this forum only.

    Is this do-able?
     
  2. Nick

    Nick Regular Member

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
    It certainly is! Just use this code:
    Code:
    <if condition="$forumid == [B][COLOR=Red]X[/COLOR][/B]">
    
    YOUR AD CODE
    
    </if>
    Where X is the forum ID you want the ad to display in.
     
  3. Chani

    Chani Grand Master

    Joined:
    Sep 1, 2009
    Messages:
    884
    Likes Received:
    54
    First Name:
    Chani
    Technically it should be:

    Code:
    [COLOR=#ff0000]<if condition=[COLOR=#0000ff]"$forum[forumid] == X"[/COLOR]>
    
    Your Banner Code Here
    
    [/COLOR][COLOR=#ff0000]</if>[/COLOR]


    Change the X to your forum's id.

    :)

     
  4. menj

    menj Regular Member

    Joined:
    Nov 24, 2009
    Messages:
    5
    Likes Received:
    0
    Thanks for this code, didn't know it was possible.
     
  5. Chani

    Chani Grand Master

    Joined:
    Sep 1, 2009
    Messages:
    884
    Likes Received:
    54
    First Name:
    Chani
  6. Dunhamzzz

    Dunhamzzz Newcomer

    Joined:
    Jun 14, 2009
    Messages:
    13
    Likes Received:
    0
    First Name:
    Matthew
    I hate to say it but you're all wrong.

    PHP:
    <if condition="$foruminfo[forumid] == X">

    </if>
    For some reason this : $forum[forumid] is printed across the net everywhere and it just doesn't work as I have been tearing my hair out for the last hour. It wasn't until I went through some other templates looking for instances of a printed out forum id (the new thread button in particular) and found the right variable.

    Google it for yourself, EVERY template conditional guide for vb 3 has been copied from the same place! Madness.
     
  7. Nick

    Nick Regular Member

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
    Different variations seem to work in different templates' that's my experience so far.

    And for the record, the one I posted does in fact work. I'm using it here. ;)
     
  8. Chani

    Chani Grand Master

    Joined:
    Sep 1, 2009
    Messages:
    884
    Likes Received:
    54
    First Name:
    Chani
    And the one I posted works for me. :)
     
  9. BabyDesigner

    BabyDesigner Adept

    Joined:
    Aug 24, 2009
    Messages:
    246
    Likes Received:
    6
    First Name:
    Meg
    Thanks so much. This is the one that ended up working for me:
    Code:
    [COLOR=#000000][COLOR=#0000bb][/COLOR][FONT=Courier New][COLOR=#007700]<if [/COLOR][COLOR=#0000bb]condition[/COLOR][COLOR=#007700]=[/COLOR][COLOR=#dd0000]"$foruminfo[forumid] == X"[/COLOR][/FONT][COLOR=#007700][FONT=Courier New]>
    
    </if>[/FONT][/COLOR][/COLOR]
     

Share This Page