vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   UKBL ~ Google Adsense in Navbar (https://vborg.vbsupport.ru/showthread.php?t=212288)

UKBusinessLive 04-26-2009 10:00 PM

UKBL ~ Google Adsense in Navbar
 
1 Attachment(s)
UKBL ~ Google Adsense in Navbar

Want to display some adsense ads in the navbar?? Want ads to show for guests and other chosen usergroups? Well now you can

https://vborg.vbsupport.ru/external/2009/04/6.png

This is a really easy and simple edit, should take no longer than a few minutes

Lets Start ;)

Go to edit the following template in your admin CP

AdminCP > Styles & Templates> Style Manager> Your Chosen Style> All style options> Edit templates> Navigation / Breadcrumb Templates> navbar

In template NAVBAR find

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>
                </if>
        </td>

and below it add

Code:

<!--<UKBL Google links Start>----------------------------------------------------------------------->

<td class="alt2">

<DIV ALIGN=RIGHT>
<if condition="!is_member_of($bbuserinfo, X, Y, Z)">
<script type="text/javascript"><!--
google_ad_client = "pub-8086024447848308";
/* 468x60, created 26/04/09 */
google_ad_slot = "9913458159";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</DIV>
</td>
</if>
<!--<UKBL google links End>----------------------------------------------------------------------->

don't forget to add your own adsense code :rolleyes: I've added mine but add yours to the above code, it should look something like this

Code:

<script type="text/javascript"><!--
google_ad_client = "pub-8086028887848308";
/* 468x60, created 26/04/09 */
google_ad_slot = "991655559";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


and dont forget to change the X,Y,Z here

Code:

<if condition="!is_member_of($bbuserinfo, X, Y, Z)">
for the usergroups that you want the adsense to show for.

Remember it takes time, upto 10 mins for the adsense code to activate, so keep refreshing your page

If you havn't got an adsense account for your forum sign up for one here https://www.google.com/adsense

Have fun

:D

Please remember to click install and i'll support you 100%

UKBusinessLive 04-27-2009 05:03 PM

:) reserved ;)

freewilley 04-27-2009 05:27 PM

cool really cool!! u are the best :)

TheHolf 05-06-2009 10:54 AM

Hmmm only 4 adsense blocks allowed per page.. Looks like I might have to remove one :D.

Thanks

Vinyljunky 05-06-2009 07:21 PM

Neat idea

Brandon Sheley 05-06-2009 07:27 PM

great idea, thanks for posting this :)
[high]* Brandon Sheley bookmarks it[/high]

UKBusinessLive 05-07-2009 05:10 AM

Thanks everyone, hope it makes you loads :D

cgway.net 05-12-2009 11:08 AM

thanks to you

scottct1 05-14-2009 06:12 PM

Installed, thanks!

joyboy2001 08-23-2009 04:33 PM

google does not recommend you let people see your publisher number ... you might want to remove that ...


All times are GMT. The time now is 01:37 PM.

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.01291 seconds
  • Memory Usage 1,736KB
  • 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
  • (4)bbcode_code_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