Log in

View Full Version : Ad placement using Ad Manager


Bat21
08-23-2013, 11:25 AM
I want to add ads to all forum sections except one.

Is there a way of adding a, "User is not browsing forum" drop down box?

Or, is there another way round this that I an not seeing?

I'm running v4.2.1

nerbert
08-23-2013, 03:18 PM
If you're putting the ad in the thread display (showthread) you can put the html inside a template conditional


<vb:if condition="$forum['forumid'] != 100">

AD HTML HERE

</vb:if>

Bat21
08-23-2013, 03:31 PM
Not sure I understand what you are saying here nerbert....

Using something like the Ad Manager I wanted to add a banner to all forums except one.

nerbert
08-23-2013, 08:51 PM
Do you want to add this to the forum display pages or showthread, where the threads are displayed?

I don't have ads on my site but I'm pretty sure you can use template conditionals in the ad html so you just put all the html inside a conditional. I used forum id = 100 as an example, use the actual id of the forum where you don't want the ad.

Bat21
08-24-2013, 06:20 AM
It is a strip of ads that goes just below the NavBar which means they show everywhere.

It is just one forum section that I don't want them displayed.

RickyH
08-24-2013, 10:38 AM
You would need to create a new div tag under the navbar just above the body_wrapper to house the ads, then code the ads into the div tag itself and css it in correctly. What kind of ads do you want? Animated Images? Slideshow of Images?

nerbert
08-24-2013, 12:44 PM
Turns out very little information is available in the navbar so I had to use $GLOBALS

This should do the trick:


<vb:if condition="!in_array($GLOBALS['forumid'], array(2,3,4,5))">
------YOUR ADS GO HERE-------
</vb:if>


This will not show ads for forums 2, 3, 4 or 5

Bat21
08-24-2013, 02:38 PM
You would need to create a new div tag under the navbar just above the body_wrapper to house the ads, then code the ads into the div tag itself and css it in correctly. What kind of ads do you want? Animated Images? Slideshow of Images?
They are just a single row of 6 small images, jpgs & gifs linking to other sites.
Turns out very little information is available in the navbar so I had to use $GLOBALS

This should do the trick:


<vb:if condition="!in_array($GLOBALS['forumid'], array(2,3,4,5))">
------YOUR ADS GO HERE-------
</vb:if>


This will not show ads for forums 2, 3, 4 or 5
That only shows them when viewing a thread, they need to be there all the time.

I have a found a way round this now by creating another style exactly the same in appearance etc for the section I don't want the ads in.

In ad manager I have then ticked the conditional Display this ad if... User is browsing using style in the original style. So this now displays the ads in all sections except the one I don't want it to which has it's own style.

Hope this makes sense?

Thanks for the help though folks :up: