vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Disable Adsense to certain forum ID's? (https://vborg.vbsupport.ru/showthread.php?t=179948)

thestaton 05-20-2008 09:26 PM

Disable Adsense to certain forum ID's?
 
I would like to disable Ad Sense to the areas of my forum that are not allowed per googles acceptable use.

How do you go about doing this?

veenuisthebest 05-20-2008 09:29 PM

what areas do you want to disable adsense on ??

thestaton 05-20-2008 09:41 PM

The areas that are NOT allowed per googles terms of use for ad sense.

veenuisthebest 05-20-2008 09:45 PM

Quote:

The areas that are NOT allowed per googles terms of use for ad sense.
so what areas are not allowed by google .. make it clear..

Jase2 05-20-2008 09:47 PM

You've added them, so I'm sure you can remove them ;)

veenuisthebest 05-20-2008 09:55 PM

okayy... i read somewhere here that google disallows displaying ads on pages that have forms, right ??

To block certain pages from displaying ads for eg. newreply.php, open newreply.php and look for

PHP Code:

define('THIS_SCRIPT''newreply'); 

newreply is what we are looking for.

Wrap your ad code like this in the conditional:-

Code:

if condition="!in_array(THIS_SCRIPT, array('newreply', 'register'))">

YOUR
AD CODE
HERE


</if>


I hope this is what you are looking for !!

thestaton 05-20-2008 09:56 PM

Quote:

Originally Posted by Jase2 (Post 1526180)
You've added them, so I'm sure you can remove them ;)

That's not the problem. If I remove them then they are gone for the entire forum. I'm just trying to figure out how to do it per forum ID's...

I found a IF statement but it's not working...

veenuisthebest 05-20-2008 10:00 PM

if you wanna block certain forumID's.. use this conditional..

Code:

<if condition="!in_array($forumid, array(1,2,3,6))">

YOUR
AD
CODE HERE

</if>


also.. check out a template conditionals list in my signature, will help you ..

thestaton 05-20-2008 10:11 PM

Quote:

Originally Posted by veenuisthebest (Post 1526191)
if you wanna block certain forumID's.. use this conditional..

Code:

<if condition="!in_array($forumid, array(1,2,3,6))">

YOUR
AD
CODE HERE

</if>


also.. check out a template conditionals list in my signature, will help you ..

Thank you very much, that did the trick :)


All times are GMT. The time now is 07:22 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.01113 seconds
  • Memory Usage 1,728KB
  • 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
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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