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

Reply
 
Thread Tools Display Modes
  #1  
Old 04-10-2009, 01:22 PM
KURTZ KURTZ is offline
 
Join Date: Nov 2006
Location: Italy
Posts: 2,257
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Google Ads: how to remove the ads ...

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
Reply With Quote
  #2  
Old 04-10-2009, 01:24 PM
KURTZ KURTZ is offline
 
Join Date: Nov 2006
Location: Italy
Posts: 2,257
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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> 
Reply With Quote
  #3  
Old 04-10-2009, 01:49 PM
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Location: Google Kansas
Posts: 4,678
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 04-12-2009, 09:25 AM
KURTZ KURTZ is offline
 
Join Date: Nov 2006
Location: Italy
Posts: 2,257
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

but the second code runs into the 404 page ... the only trouble that i got is the google's id in the other 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 07:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07716 seconds
  • Memory Usage 2,259KB
  • Queries Executed 14 (?)
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
  • (13)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (1)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete