<if condition> for excluding forums...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ShackMaster
    Senior Member
    • Apr 2006
    • 520
    • 3.5.x

    <if condition> for excluding forums...

    We have several sponsor forums that we don't want our Adsense ads to show up in forumdisplay in the right column.

    To make ads show in a sponsor forums forumdisplay, we use the following:

    Code:
    <if condition="$foruminfo[forumid] == xxx">  <a href="http://www.sponsor.com" target="_blank"><img src="http://www.hometheatershack.com/images/300x250_sponsor.jpg" alt="Sponsor" width="300" height="250" border="0" /></a>  </if>
    Where 'xxx' is the forum id of the sponsor.

    You can see an example here in this sponsor's forum... Adsense to the right... http://www.hometheatershack.com/forums/gr-research/

    However, in that same forum we have Adsense ads that show up on all of the forumdisplay pages.

    I am guessing we need the <if condition> code so that we can wrap it around the Adsense code and exclude the Adsense ads from all of our sponsor forums. In their forums we will show strictly their ads.

    Thanks!
    http://www.hometheatershack.com/forums
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24286
    • 6.0.X

    #2
    You can use a condition like this to exclude certain forums by specific forumids:

    Code:
    <if condition="!in_array($foruminfo[forumid], array(1,2,3,4))">Adsense code here</if>
    Where 1,2,3,4 are the forumids.
    MARK.B
    vBulletin Support
    ------------
    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

    Comment

    • ShackMaster
      Senior Member
      • Apr 2006
      • 520
      • 3.5.x

      #3
      Perfect! Thank you!
      http://www.hometheatershack.com/forums

      Comment

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