vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Ad placement using Ad Manager (https://vborg.vbsupport.ru/showthread.php?t=301526)

Bat21 08-23-2013 12:25 PM

Ad placement using Ad Manager
 
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 04:18 PM

If you're putting the ad in the thread display (showthread) you can put the html inside a template conditional

Code:

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

    AD HTML HERE

</vb:if>


Bat21 08-23-2013 04: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 09: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 07: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 11: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 01:44 PM

Turns out very little information is available in the navbar so I had to use $GLOBALS

This should do the trick:

Code:

<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 03:38 PM

Quote:

Originally Posted by RickyH (Post 2440710)
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.
Quote:

Originally Posted by nerbert (Post 2440729)
Turns out very little information is available in the navbar so I had to use $GLOBALS

This should do the trick:

Code:

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


All times are GMT. The time now is 11:22 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00993 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete