Announcement

Collapse
No announcement yet.

<if condition> for excluding forums...

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

  • <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

  • #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

    TalkNewsUK - My vBulletin 5.6.4 Demo
    AdminAmmo - My Cloud Demo

    Comment


    • #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...
      X