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

Reply
 
Thread Tools
Google Adsense In Navbar Details »»
Google Adsense In Navbar
Version: 1.00, by SuperTaz SuperTaz is offline
Developer Last Online: Mar 2022 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.8.x Rating:
Released: 12-26-2009 Last Update: 12-26-2009 Installs: 13
Template Edits
Re-useable Code  
No support by the author.


How To: Go to http://www.google.com/adsense and create your own account there and replace the blue text below in the code with your PUB ID.

Description: To have Google Adsense in your navbar!

Installation Time: < 1 minute

Installation:

Step 1: Find this code in your Navbar template:

Styles and Templates > Style Manager > Your style > Navigation/Breadcrumb Templates > Navbar.

Code:
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
Directly below add:

Code:
<!--<Adsense Start>----------->

<td class="alt2">
<div align="center">
<p align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-YOUR PUB ID HERE";
/* 468x60, created 12/26/09 */
google_ad_slot = "2895235903";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</p>
</div>
</td>

<!--<Adsense End>------------------------------>

If you want only registered members to view it, use this code:


Code:
<!--<Adsense Start>----------->

<td class="alt2">
<div align="center">
<if condition="$show['member']">
<p align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-YOUR PUB ID HERE";
/* 468x60, created 12/26/09 */
google_ad_slot = "2895235903";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</p>
</if>
</div>
</td>

<!--<Adsense End>------------------------------>
If you notice, I only added the <if> conditional.

In the blue area, enter your own PUB ID!!

DONE!

NOTE: Someone pointed out a mod similar to this one for the 3.7 series. So, he gets credit for his work also.

If you use this mod, please CLICK INSTALL!!!

Download Now

File Type: txt adsense_install.txt (1.6 KB, 43 views)

Screenshots

File Type: png ads.PNG (9.2 KB, 0 views)

Supporters / CoAuthors

Show Your Support

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

Comments
  #12  
Old 01-03-2010, 07:39 PM
runwtdevil runwtdevil is offline
 
Join Date: Oct 2009
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there anyway to make the google ad smaller? The banner is too big, and makes the navbar higher, which I don't want. Can you simply edit the code in the navbar to a smaller dimension?
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 11:57 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.07646 seconds
  • Memory Usage 2,228KB
  • Queries Executed 20 (?)
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
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_attachment
  • (2)postbit_onlinestatus
  • (2)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete