vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Add-On Releases - Google Adsense In Navbar (https://vborg.vbsupport.ru/showthread.php?t=231285)

SuperTaz 12-26-2009 10:00 PM

Google Adsense In Navbar
 
1 Attachment(s)

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!!!

SuperTaz 12-27-2009 03:16 AM

Reserved for later use.

Taurus1 12-27-2009 09:00 AM

Mmmmm, doesn't work for me! I see where it should go, and when I refresh my page I just see a white box for a second where it should be.

Sven2488 12-27-2009 11:21 AM

I've the same problem. I know the Problem. You must use your own google ad slot number :)

SuperTaz 12-27-2009 09:07 PM

Yes, you need to have your own PUB ID from http://www.google.com/adsense. It is free to create an account. Just replace the blue text with your new PUB ID and you should be good.

saadessa 12-27-2009 10:23 PM

applied by my own its great work thank you

Taurus1 12-28-2009 01:22 AM

I entered my own code, but it is still not showing.

SuperTaz 12-28-2009 11:26 PM

Did you create your own 468x60 horizontal ad unit at http://www.google.com/adsense and input that code where mine is and take mine out?

ramjet 12-31-2009 08:20 AM

" Step 1: Find this code: "

Where do I find this code?

SuperTaz 12-31-2009 11:32 PM

Quote:

Originally Posted by ramjet (Post 1943220)
" Step 1: Find this code: "

Where do I find this code?

Sorry. Updated.

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


All times are GMT. The time now is 11: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.01159 seconds
  • Memory Usage 1,738KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete