Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 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 dieselpowered dieselpowered is offline
Developer Last Online: Aug 2014 Show Printable Version Email this Page

Version: 3.5.2 Rating:
Released: 12-09-2005 Last Update: 12-09-2005 Installs: 94
Template Edits
 
No support by the author.

This is a really quick template change, just an additional location for those of you looking to add google adsense to your board.

In your navbar template find (there are multiple instances of this code, use the first instance):
Code:
<if condition="$show['member']">
Above this add:
Code:
<!-- start adsense code -->
<td class="alt2">
Your adsense code
</td>
<!-- /end adsense code -->
Thats it, your all done

Hope this helps someone out, I am far from a coder, however, wanted to atleast attempt to give back to the community If you happen to use, please CLICK INSTALL

Show Your Support

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

Comments
  #32  
Old 03-19-2006, 02:37 AM
linkwavescom linkwavescom is offline
 
Join Date: Mar 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font color="Red">work good </font>
Reply With Quote
  #33  
Old 03-27-2006, 01:36 AM
mattyk72 mattyk72 is offline
 
Join Date: Mar 2004
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does anyone know if this is a TOS violation??

Any way to have it turn off in non-content pages?
Reply With Quote
  #34  
Old 03-30-2006, 06:59 PM
Magle Magle is offline
 
Join Date: Jul 2005
Location: Denmark
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mattyk72
Any way to have it turn off in non-content pages?
Yes, simply add this code before the hack:
Code:
<if condition="(THIS_SCRIPT == 'forumdisplay' OR THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'index')">
and this one after:
Code:
</if>
Now it only shows up on the content pages - thus, no TOS violtation
Reply With Quote
  #35  
Old 04-04-2006, 04:54 PM
pbradish pbradish is offline
 
Join Date: Mar 2006
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod, thank you
Reply With Quote
  #36  
Old 04-06-2006, 07:18 PM
shortbus1662 shortbus1662 is offline
 
Join Date: Oct 2004
Location: Enid, OK
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it is no longer a TOS violation from what I understand.

I believe the modified the TOS to better work with forums.
Reply With Quote
  #37  
Old 04-10-2006, 06:01 PM
mattyk72 mattyk72 is offline
 
Join Date: Mar 2004
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Magle
Yes, simply add this code before the hack:
Code:
<if condition="(THIS_SCRIPT == 'forumdisplay' OR THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'index')">
and this one after:
Code:
</if>
Now it only shows up on the content pages - thus, no TOS violtation
thank you so much!

Better to be safe than sorry with Google I say.

thanks again
Reply With Quote
  #38  
Old 05-13-2006, 01:08 PM
BlueDevil98 BlueDevil98 is offline
 
Join Date: May 2006
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have vbadvanced and vblinks, so I did

Code:
<if condition="(THIS_SCRIPT == 'newthread')">

<else />
before the code suggested

and
Code:
</if>
after. That way it shows on all the vbadvanced pages too. Are there other pages that google wouldn't approve of that I should be excluding?
Reply With Quote
  #39  
Old 05-14-2006, 09:03 PM
Dr.Viggy Dr.Viggy is offline
 
Join Date: Apr 2006
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
<if condition="is_member_of($bbuserinfo, 6)">ADSENSE CODE HERE</if>
here's a little something to show the adsense for only the usergroups you want. Just change the "6" to the usergroups that you want to see it (separated by commas)
Reply With Quote
  #40  
Old 08-04-2006, 04:27 PM
Harley D's Avatar
Harley D Harley D is offline
 
Join Date: Jan 2003
Location: WagnerTech.net
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THANKS >clicks install<
Reply With Quote
  #41  
Old 08-08-2006, 07:44 AM
Darwa Darwa is offline
 
Join Date: Jul 2006
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm missing something silly here. Please help

This is the complete code from my header. Where am I going wrong?

Quote:
<!-- logo -->
<a name="top"></a>
<table border="0" width="90%" cellpadding="0" cellspacing="0" align="center" background="$stylevar[imgdir_misc]/head_back.gif">
<tr>

<td align="left" valign="top"><img src="$stylevar[imgdir_misc]/head_left.gif" alt="" /></td>
<td align="right" valign="middle"><img src="$stylevar[imgdir_misc]/banner.gif" alt="" /></td>

<td align="$stylevar[center]">
&nbsp;
</td>
</tr>
</table>
<!-- /logo -->
<!-- Navigation bar -->
<table width="90%" style="background-image:url($stylevar[imgdir_misc]/nav.gif)" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top" height="45">

<table width="50%" align="right" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" width="102" height="45"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img src="$stylevar[imgdir_misc]/nav_home.gif" width="102" height="45" border="0" alt="" /></a></td>
<if condition="$show['registerbutton']">
<td width="102" height="45"><a href="register.php$session[sessionurl_q]" rel="nofollow"><img src="$stylevar[imgdir_misc]/nav_reg.gif" width="102" height="45" border="0" alt="" /></a></td>
<else />
<td width="102" height="45" id="usercptools"><a href="$show[nojs_link]#usercptools"><img src="$stylevar[imgdir_misc]/nav_link.gif" width="102" height="45" border="0" alt="" /></a><script type="text/javascript"> vbmenu_register("usercptools" ,1); </script></td>
</if>
<td align="left" valign="top" width="102" height="45"><a href="memberlist.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/nav_member.gif" width="102" height="45" border="0" alt="" /></a></td>
<td align="left" valign="top" width="102" height="45"><a href="usercp.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/nav_usercp.gif" width="102" height="45" border="0" alt="" /></a></td>
<td align="left" valign="top" width="102" height="45"><a href="calendar.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/nav_cal.gif" width="102" height="45" border="0" alt="" /></a></td>
<td align="left" valign="top" width="102" height="45" id="navbar_search"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow"><img src="$stylevar[imgdir_misc]/nav_search.gif" width="102" height="45" border="0" alt="" /></a><script type="text/javascript"> vbmenu_register("navbar_search" ,1); </script></td>
<td align="left" valign="top" width="102" height="45"><a href="faq.php$session[sessionurl_q]" accesskey="5"><img src="$stylevar[imgdir_misc]/nav_faq.gif" width="102" height="45" border="0" alt="" /></a></td>

</tr>
</table>
</td>
</tr>
</table>

<if condition="$show['popups']">
<!-- NAVBAR POPUP MENUS -->

<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="text" class="bginput" name="query" size="20" />&nbsp;$gobutton<br />
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]:</a></td>
</tr>
<!-- start adsense code -->
<td class="alt2">
<script type="text/javascript"><!--
google_ad_client = "pub-3443198473457595";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "4C4C4C";
google_color_bg = "333333";
google_color_link = "FFFF66";
google_color_text = "B47B10";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
<!-- /end adsense code -->

<if condition="$show['member']">
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]:</a></td>
</tr>
<else />
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]:</a></td>
</tr>
</if>
</table>
</div>
<!-- / header quick search form -->
</if>

<if condition="$show['member']">
<!-- user cp tools menu -->
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">

<tr><td class="thead">$vbphrase[quick_links]</td></tr>
<if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>
<tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=n o,menubar=no,toolbar=no,scrollbars=yes,resizable=y es,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>

<tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_control_panel]</a></td></tr>
<if condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
<!--<if condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>-->
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>

<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
<if condition="$show['pmstats']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]" rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr>
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
<if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php$session[sessionurl_q]">$vbphrase[whos_online]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="billspaypal.php">Donate!</a></td></tr>

</table>
</div>
<!-- / user cp tools menu -->
</if>
<!-- / NAVBAR POPUP MENUS -->

<!-- PAGENAV POPUP -->

<div class="vbmenu_popup" id="pagenav_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form">
<input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" />
<input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]" />
</form>
</td>
</tr>
</table>
</div>

<!-- / PAGENAV POPUP -->
</if>
<!-- / Navagation bar -->

<!-- content table -->
$spacer_open

$_phpinclude_output
Thanks
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 10:53 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.05411 seconds
  • Memory Usage 2,347KB
  • Queries Executed 25 (?)
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
  • (8)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete