Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-23-2013, 12:25 PM
Bat21 Bat21 is offline
 
Join Date: Jan 2003
Location: UK
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 08-23-2013, 04:18 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #3  
Old 08-23-2013, 04:31 PM
Bat21 Bat21 is offline
 
Join Date: Jan 2003
Location: UK
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 08-23-2013, 09:51 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 08-24-2013, 07:20 AM
Bat21 Bat21 is offline
 
Join Date: Jan 2003
Location: UK
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 08-24-2013, 11:38 AM
RickyH RickyH is offline
 
Join Date: Dec 2011
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 08-24-2013, 01:44 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 08-24-2013, 03:38 PM
Bat21 Bat21 is offline
 
Join Date: Jan 2003
Location: UK
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RickyH View Post
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 View Post
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:
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:38 AM.


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.12526 seconds
  • Memory Usage 2,230KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete