PDA

View Full Version : Google Ads: how to remove the ads ...


KURTZ
04-10-2009, 01:22 PM
from a custom template ...? :)

hi folks!

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

i tried to wrap the templates with this code:

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

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

so i tried with this:

<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, 01:24 PM
i've these templates ...

footer_end

blank

footer_start

<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

blank

forumhome_afterforum

blank

header_end

blank

header_logo

blank

navbar_below

<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

blank

showthread_firstpost

blank

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

showthread_firstpost_start

<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, 01: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, 09: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 ...