Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-30-2007, 02:10 AM
tutusinghsohi's Avatar
tutusinghsohi tutusinghsohi is offline
 
Join Date: May 2006
Location: Virginia, USA
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Displaying Adsense ad's only in specific forums

well i have adult contents on my board...
and i dont want to get kicked out of adsense because i was showing ad's in the adult section..
so is there any way i can select which forums the ad's should be shown?

thanks..
Reply With Quote
  #2  
Old 03-30-2007, 02:26 AM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<if condition="$forumid = in_array(12,14,16)">

That should be it or very close.

http://www.vbulletin.com/docs/html/ and search for template conditionals
Reply With Quote
  #3  
Old 03-30-2007, 10:14 AM
tobybird's Avatar
tobybird tobybird is offline
 
Join Date: Jul 2006
Posts: 374
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had a similar question at one point and it was suggest I use this format:

<if condition="in_array($GLOBALS[forumid], array(1,2,3,5))">
<tr>content</tr>
</if>

It's worked well so far.
Reply With Quote
  #4  
Old 03-30-2007, 07:23 PM
tutusinghsohi's Avatar
tutusinghsohi tutusinghsohi is offline
 
Join Date: May 2006
Location: Virginia, USA
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tobybird View Post
I had a similar question at one point and it was suggest I use this format:

<if condition="in_array($GLOBALS[forumid], array(1,2,3,5))">
<tr>content</tr>
</if>

It's worked well so far.
so do you guys want me to enter this code...
Code:
<if condition="in_array($GLOBALS[forumid], array(1,2,3,5))">
<tr>Adsense Code</tr>
</if>
but where?
and do i put in the adsense code in the "content" place?

sorry for these questions, dont know anything about this
Reply With Quote
  #5  
Old 03-30-2007, 10:26 PM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, ad your asense code where he types in content.

Goto your admincp, styles and templates - edit the style you are using. You will need to edit the template where you want the ad to show but I recommend the bottom of the navbar.
Reply With Quote
  #6  
Old 04-03-2007, 03:40 PM
tutusinghsohi's Avatar
tutusinghsohi tutusinghsohi is offline
 
Join Date: May 2006
Location: Virginia, USA
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

and how do i make it to display in every where else expect the adult area..
i mean the control panel, forum home, profile page, advanced reply area, calander, etc..
Reply With Quote
  #7  
Old 04-03-2007, 06:43 PM
Staxed's Avatar
Staxed Staxed is offline
 
Join Date: Jun 2006
Location: Fayetteville, NC
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

those numbers... 1, 2, 3, 4, 5, etc...should be whatever the forumids of your non-adult forums are...that will make the ads show in those forums and no other ones...
Reply With Quote
  #8  
Old 04-03-2007, 07:04 PM
tobybird's Avatar
tobybird tobybird is offline
 
Join Date: Jul 2006
Posts: 374
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Reeve of shinra View Post
<if condition="$forumid = in_array(12,14,16)">
Quote:
Originally Posted by tobybird View Post
<if condition="in_array($GLOBALS[forumid], array(1,2,3,5))">

Which of these is correct? I'm wondering if I'm doing it incorrectly. Thanks!
Reply With Quote
  #9  
Old 04-04-2007, 02:23 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<if condition="!in_array($forum[forumid], array(xx,xx))">
ad content
</if>
Since I run ads in all but 2 forums, I use this conditional to show ads in all forums except the ones I add. So, xx,xx would be the forums you don't want ads to show in.
Reply With Quote
  #10  
Old 04-04-2007, 04:03 PM
tutusinghsohi's Avatar
tutusinghsohi tutusinghsohi is offline
 
Join Date: May 2006
Location: Virginia, USA
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Smoothie View Post
Code:
<if condition="!in_array($forum[forumid], array(xx,xx))">
ad content
</if>
Since I run ads in all but 2 forums, I use this conditional to show ads in all forums except the ones I add. So, xx,xx would be the forums you don't want ads to show in.
thanks dude...
this is much easier than typing in all the forums where i want the ad's to be shown..

but do the ad's show in the forum home, cp, p.m., profile, etc pages?
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 01:11 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.05621 seconds
  • Memory Usage 2,257KB
  • 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
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete