vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Displaying Adsense ad's only in specific forums (https://vborg.vbsupport.ru/showthread.php?t=143565)

tutusinghsohi 03-30-2007 02:10 AM

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

Reeve of shinra 03-30-2007 02:26 AM

<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

tobybird 03-30-2007 10:14 AM

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.

tutusinghsohi 03-30-2007 07:23 PM

Quote:

Originally Posted by tobybird (Post 1215999)
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 :(

Reeve of shinra 03-30-2007 10:26 PM

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.

tutusinghsohi 04-03-2007 03:40 PM

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

Staxed 04-03-2007 06:43 PM

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

tobybird 04-03-2007 07:04 PM

Quote:

Originally Posted by Reeve of shinra (Post 1215820)
<if condition="$forumid = in_array(12,14,16)">

Quote:

Originally Posted by tobybird (Post 1215999)
<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!

Smoothie 04-04-2007 02:23 AM

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.

tutusinghsohi 04-04-2007 04:03 PM

Quote:

Originally Posted by Smoothie (Post 1219412)
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?


All times are GMT. The time now is 03:31 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.01299 seconds
  • Memory Usage 1,735KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete