vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Google Ads: how to remove the ads ... (https://vborg.vbsupport.ru/showthread.php?t=210849)

KURTZ 04-10-2009 12:22 PM

Google Ads: how to remove the ads ...
 
1 Attachment(s)
from a custom template ...? :)

hi folks!

i've created a custom 404 error page (http://www.vbseo.com/f34/create-cust...seo-use-11288/) and i need to remove the ads from this page ...

i tried to wrap the templates with this code:

PHP Code:

<if condition="$_REQUEST['do'] != '404'">
#your adsense code#  </if> 

and this doesn't runs completely ... :(

so i tried with this:

PHP Code:

<if condition="THIS_SCRIPT != 'misc'">
#your adsense code#  </if> 

and this runs correctly only into the 404.php page because it leaves my ads ID into the other pages .... (check out the attachment)

so i need a tip to fix this trouble ... :)

TIA

ps. obviously i use the integrated ads by Jelsoft :)

KURTZ 04-10-2009 12:24 PM

i've these templates ...

footer_end

PHP Code:

blank 

footer_start

PHP Code:

<if condition="$GLOBALS['vbulletin']->adsense_pub_id">
<
div style="width:728px; margin:1em auto 0 auto">
<
script type="text/javascript"><!--
google_ad_client "{$GLOBALS['vbulletin']->adsense_pub_id}";
google_ad_host "{$GLOBALS['vbulletin']->adsense_host_id}";
google_ad_width 728;
google_ad_height 90;
google_ad_format "728x90_as";
google_ad_type "text_image";
google_ad_channel "";
google_color_border "$stylevar[page_bgcolor_hex]";
google_color_bg "$stylevar[page_bgcolor_hex]";
google_color_link "$stylevar[body_link_n_fgcolor_hex]";
google_color_text "$stylevar[body_fgcolor_hex]";
google_color_url "$stylevar[body_link_n_fgcolor_hex]";
google_ui_features "rc:6";
//-->
</script>
<
script type="text/javascript"
  
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</
script>
</
div>
</if> 

forumdisplay_afterthreads

PHP Code:

blank 

forumhome_afterforum

PHP Code:

blank 

header_end

PHP Code:

blank 


header_logo


PHP Code:

blank 

navbar_below

PHP Code:

<if condition="$GLOBALS['vbulletin']->adsense_pub_id">
<
div style="width:728px; margin:0 auto; padding-bottom:1em">
<
script type="text/javascript"><!--
google_ad_client "{$GLOBALS['vbulletin']->adsense_pub_id}";
google_ad_host "{$GLOBALS['vbulletin']->adsense_host_id}";
google_ad_width 728;
google_ad_height 90;
google_ad_format "728x90_as";
google_ad_type "text_image";
google_ad_channel "";
google_color_border "$stylevar[alt2_bgcolor_hex]";
google_color_bg "$stylevar[alt1_bgcolor_hex]";
google_color_link "$stylevar[body_link_n_fgcolor_hex]";
google_color_text "$stylevar[body_fgcolor_hex]";
google_color_url "$stylevar[body_link_n_fgcolor_hex]";
google_ui_features "rc:6";
//-->
</script>
<
script type="text/javascript"
  
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</
script>
</
div>
</if> 

showthread_beforeqr

PHP Code:

blank 


showthread_firstpost


PHP Code:

blank 

showthread_firstpost_sig
PHP Code:

<if condition="$GLOBALS['vbulletin']->adsense_pub_id">
<if 
condition="!$bbuserinfo['userid']">
<
div style="clear:both"></div>
</if>
</if> 

showthread_firstpost_start

PHP Code:

<if condition="$GLOBALS['vbulletin']->adsense_pub_id">
<if 
condition="!$bbuserinfo['userid']">
<
div style="float:right; width:300px; height:250px; margin-left:10px">
<
script type="text/javascript"><!--
google_ad_client "{$GLOBALS['vbulletin']->adsense_pub_id}";
google_ad_host "{$GLOBALS['vbulletin']->adsense_host_id}";
google_ad_width 300;
google_ad_height 250;
google_ad_format "300x250_as";
google_ad_type "text_image";
google_ad_channel "";
google_color_border "$stylevar[alt1_bgcolor_hex]";
google_color_bg "$stylevar[alt2_bgcolor_hex]";
google_color_link "$stylevar[body_link_n_fgcolor_hex]";
google_color_text "$stylevar[body_fgcolor_hex]";
google_color_url "$stylevar[body_link_n_fgcolor_hex]";
google_ui_features "rc:6";
//-->
</script>
<
script type="text/javascript"
  
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</
script>
</
div>
</if>
</if> 


Brandon Sheley 04-10-2009 12:49 PM

seems like a lot of work, why not use the built in ad locations and you'll Know exactly where every ad is
I would stay away from the "intergrated jelsoft" adsense ads

KURTZ 04-12-2009 08:25 AM

but the second code runs into the 404 page ... the only trouble that i got is the google's id in the other pages ...


All times are GMT. The time now is 03:45 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.02208 seconds
  • Memory Usage 1,765KB
  • 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
  • (13)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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