Certain banner in certain forum?

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

  1. BabyDesigner

    BabyDesigner Adept

    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

    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

    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

    Thanks for this code, didn't know it was possible.
     
  5. Chani

    Chani Grand Master

  6. Dunhamzzz

    Dunhamzzz Newcomer

    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

    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

    And the one I posted works for me. :)
     
  9. BabyDesigner

    BabyDesigner Adept

    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