PDA

View Full Version : UKBL ~ Google Adsense in Navbar


UKBusinessLive
04-26-2009, 10:00 PM
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

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

and below it add


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

<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

<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

[B]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 :)
* Brandon Sheley bookmarks it

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

Cplkaos
09-17-2009, 11:25 AM
I have copied the script and have inserted my own google code.

When I leave the users as X, Y, Z as per your code, I get webpage not displayed.

When I change XYZ for my relevent usergroups (6 Being ADMIN) there is nothing in the navbar, even after 10 mins.

I have switched of the Adsense I had running in the ADMIN CP incase there was a conflict.

Any help would be sooooooooooooooooooooooo helpful.

Cheers.