Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Adsense Leaderboard on Non-Index Pages Details »»
Adsense Leaderboard on Non-Index Pages
Version: 1.00, by Kaelon Kaelon is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.6.8 Rating:
Released: 09-14-2007 Last Update: Never Installs: 7
Template Edits
 
No support by the author.

After reading some of the great Google Adsense template modifications on this forum, I decided to contribute one of my own. Special thanks go to StarBuG, whose Adsense template modifications have been tremendous inspiration.

What does it do?
This modification places a Google Adsense 728 x 90 leaderboard under the navigation bar (navbar) on all vBulletin-powered pages that call the navbar, except for the Forumhome (index). The integration of the Google Adsense is placed in a simple, elegant, style-compliant box.

How to Install

In Admin CP > Styles & Templates > Style Manager > Edit Templates, edit the navbar template. Search for:

Code:
<!-- / nav buttons bar -->
And add underneath:

Code:
<if condition="THIS_SCRIPT != 'index'">
<!-- Google Adsense Headers, Non Index -->
<br />
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center" style="border-bottom-width: 0px">
<tr><td class="alt1" align="center">
<script type="text/javascript"><!--
google_ad_client = "your pub id here";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_color_border = "222222";
google_color_bg = "222222";
google_color_link = "FFB019";
google_color_text = "D7CEA4";
google_color_url = "D7CEA4";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td></tr>
</table>
<!-- / Google Adsense Headers, Non Index -->
</if>
Simply customize the google_color scheme to match the link, text, and background colors of your site (preferrably matching up with the link, alt1 text, and alt1 background). Then, you're all set! Feel free to mark this as installed if you use it on your site.

Demo
Aelyria.com - just enter any forum/area.

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 09-15-2007, 09:46 PM
hnjco hnjco is offline
 
Join Date: Jul 2006
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed, thanks for it.

Is there way for Adsense not to shown on forumhome?
Reply With Quote
  #3  
Old 09-16-2007, 12:20 AM
profanitytalker profanitytalker is offline
 
Join Date: Nov 2006
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. Great mod. Installed.
Reply With Quote
  #4  
Old 09-16-2007, 04:10 AM
Kaelon's Avatar
Kaelon Kaelon is offline
 
Join Date: Jan 2002
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hnjco View Post
Installed, thanks for it.

Is there way for Adsense not to shown on forumhome?
Yes, the default configuration of this template mod is that it will show on all pages but not on forumhome (/forums/index.php). The conditional takes care of that:

Code:
<if condition="THIS_SCRIPT != 'index'">
If you want this ad to appear everywhere, including forumhome, just get rid of the first and last lines (the if-statements/conditionals).

Thanks, guys.
Reply With Quote
  #5  
Old 09-16-2007, 07:28 AM
Magnumutz's Avatar
Magnumutz Magnumutz is offline
 
Join Date: Feb 2006
Location: Romania
Posts: 731
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't think you were supposed to remove the vBulletin copyrights from the footer...
Reply With Quote
  #6  
Old 09-16-2007, 12:51 PM
Kaelon's Avatar
Kaelon Kaelon is offline
 
Join Date: Jan 2002
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Magnumutz View Post
I don't think you were supposed to remove the vBulletin copyrights from the footer...
I have a branding-free license for vBulletin, and all of my products.
Reply With Quote
  #7  
Old 09-17-2007, 02:28 PM
momo2 momo2 is offline
 
Join Date: Feb 2007
Posts: 327
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent, thanks.........
Reply With Quote
  #8  
Old 01-22-2008, 10:40 AM
glutenfree glutenfree is offline
 
Join Date: Nov 2007
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anybody help me how to make a condition so that this does not appear on non-content pages? ... User CP, search, new thread..etc.

Any help would be appreciated.

I tried mimicking the original condition that stops it from showing on index but I must be doing something wrong.
Reply With Quote
  #9  
Old 05-06-2008, 05:17 PM
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Location: Booneville, AR, USA
Posts: 1,428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

glutenfree: change the if condition from
PHP Code:
<if condition="THIS_SCRIPT != 'index'"
to
PHP Code:
<if condition="THIS_SCRIPT != 'usercp'"
An array may be needed so that you can have it not display on usercp, search, new thread, etc.
Reply With Quote
  #10  
Old 05-18-2008, 02:57 AM
hnjco hnjco is offline
 
Join Date: Jul 2006
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there anyway of not to have ads on few sections but all rest?

like i have sports, image, jokes etc and don't want ads on image section but on all rest of sections?
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 01:29 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.04484 seconds
  • Memory Usage 2,295KB
  • Queries Executed 24 (?)
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
  • (3)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete