Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
vBulletin Google Adsense Deep Integration Tutorial
NeutralizeR
Join Date: Aug 2005
Posts: 355

by NeutralizeR NeutralizeR is offline 14 Feb 2006

This tutorial is written to show you how to use your Google Adsense codes efficiently in your vBulletin (3.5+) templates. I have a very heavily modified vBulletin style but i used the original style for this tutorial to be simple and match the colors. You can change everything as you want to find the most fitting results for your vBulletin.

Alternate ads-PSAs to Collapsible ads:

Collapsing ad units are an optional advanced feature of alternate ads. A+ the collapsing ad unit code will 'collapse' your ad unit so that it takes up no page space if there are no relevant ads available. This allows you to minimize any blank space that would otherwise occur through the use of alternate colors.

To implement the collapsing ad units feature, you'll need to host a small HTML file on your domain. Your alternate ad URL will reference this file, which will be called if there are no ads available for that particular ad unit.
http://joomla.medspan.info/forum/index.php/topic,57.0.html

Create a HTML file with this code and save it as collapsible_ad.html:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Upload this file to your web server. (http://www.yourwebsite.com/collapsible_ad.html)

Go to your Google Adsense account and grap your google_ad_client and google_ad_channel codes. (google_ad_channel is optional)

Open Notepad and paste these codes as you will change them with youradsensecode and yourchannelcode on the following steps.

We will use these there ad layouts in this tutorial:

728 x 90 Leaderboard
468 x 60 Banner
234 x 60 Half Banner

...and one link unit:

468 x 15

Note: navbar template editing step is optional because it may be against the Google Adsense rules for you. If you edit navbar template, almost all of your vBulletin pages will have Adsense ads at the top of the pages. My navbar and header templates include some flash, gif and text content and i update them regularly. It's why i use Adsense ads in navbar. You may apply this step (the ad unit) manually to your FORUMHOME, FORUMDISPLAY, etc templates...

Open your navbar template: vBulletin AdminCP > Styles & Templates > Edit Templates > Navigation / Breadcrumb Templates > navbar

(for the link unit)

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[bbtitle]</strong></div>
</if>
Add below:
<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 468;
google_ad_height = 15;
google_ad_format = "468x15_0ads_al_s";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "22229C";
google_color_url = "000000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
Results:





(for the ad unit)

Find:
<!-- / PAGENAV POPUP -->
</if>
Add below:
<table class="tborder" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="alt1" align="center">
&nbsp;<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "FF0000";
google_color_url = "000000";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>&nbsp;
</td>
</tr>
</table><br />
Results:




Save.



Open your FORUMDISPLAY template: vBulletin AdminCP > Styles & Templates > Edit Templates > Forum Display Templates > FORUMDISPLAY

(First thread)

Find:
<if condition="$show['threads']">
Add below:
<tr>
<td align="center" class="alt1">-</td>
<td align="center" class="alt2">-</td>
<td class="alt1">
<div>
<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "22229C";
google_color_url = "000000";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</td>

<td class="alt2 smallfont" align="center">Sponsored Links</td>

<td class="alt1" align="center">-</td>
<td class="alt2" align="center">-</td>
<if condition="$show['inlinemod']"><td class="alt1" align="center">-</td></if>

</tr>

(Last thread)

Find:
<!-- end show threads -->
Add below:
<tr>
<td align="center" class="alt1">-</td>
<td align="center" class="alt2">-</td>
<td class="alt1">
<div>
<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "22229C";
google_color_url = "000000";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</td>

<td class="alt2 smallfont" align="center">Sponsored Links</td>

<td class="alt1" align="center">-</td>
<td class="alt2" align="center">-</td>
<if condition="$show['inlinemod']"><td class="alt1" align="center">-</td></if>

</tr>
Results:




Save.

http://www.vbulletin.org/forum/showthread.php?t=102466


Open your search_results template: vBulletin AdminCP > Styles & Templates > Edit Templates > Search Templates > search_results

(First result)

Find:
$searchbits

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">

<else />
Add below:
<tr>
<td align="center" class="alt1">-</td>
<td align="center" class="alt2">-</td>
<td class="alt1">
<div>
<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "22229C";
google_color_url = "000000";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</td>

<td class="alt2 smallfont" align="center">Sponsored Links</td>

<td class="alt1" align="center">-</td>
<td class="alt2" align="center">-</td>
<td class="alt1" align="center">-</td>
<if condition="$show['inlinemod']"><td class="alt1" align="center">-</td></if>

</tr>

(Last result)

Find:
</tr>
$searchbits
Add below:
<tr>
<td align="center" class="alt1">-</td>
<td align="center" class="alt2">-</td>
<td class="alt1">
<div>
<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "22229C";
google_color_url = "000000";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</td>

<td class="alt2 smallfont" align="center">Sponsored Links</td>

<td class="alt1" align="center">-</td>
<td class="alt2" align="center">-</td>
<td class="alt1" align="center">-</td>
<if condition="$show['inlinemod']"><td class="alt1" align="center">-</td></if>

</tr>
Results:




Save.


Open your postbit(legacy) template: vBulletin AdminCP > Styles & Templates > Edit Templates > Postbit Templates > postbit(legacy)

(First post and last shown post)

Find:
<!-- / message -->
Add below:
<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">
<center>
<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "FF0000";
google_color_url = "000000";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
</if>
Save.
http://www.vbulletin.org/forum/showp...30&postcount=7

Results:





vBulletin Google Adsense Deep Integration Tutorial by NeutralizeR @ www.MsXLabs.org

Last edited by NeutralizeR; 03 Apr 2006 at 01:36..
Views: 214244
Reply With Quote
Comments
  #2  
Old 14 Feb 2006, 15:13
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Real name: Josh
Wow thanks man, this is a great tutorial!
Reply With Quote
  #3  
Old 14 Feb 2006, 15:29
The Chief's Avatar
The Chief The Chief is offline
 
Join Date: Aug 2005
wow, thats an awesome tutorial, thanks so much!!
__________________
Think Hype Networks | MeandIsis
Reply With Quote
  #4  
Old 16 Feb 2006, 19:46
Developer's Avatar
Developer Developer is offline
 
Join Date: Sep 2005
Real name: Ahmed || Devo.
Very nice thnx i wish there is install button
__________________
Developer,,
"Know thing about everything ... Know everything about thing"

I was here as a coder, and i am there as a student
Reply With Quote
  #5  
Old 17 Feb 2006, 14:35
Smiry Kin's's Avatar
Smiry Kin's Smiry Kin's is offline
 
Join Date: Dec 2005
i no google is used by most forums, as there to little, but could you make a guide for targetpoint please?
Reply With Quote
  #6  
Old 17 Feb 2006, 17:27
TheComputerGuy's Avatar
TheComputerGuy TheComputerGuy is offline
 
Join Date: Oct 2001
Real name: Joe
I wasn't 100% that you could make a post part of Googles ad. I thought someone got in trouble for that being it looks like original content.

This is one heck of a tutorial though!
__________________
I'll buy your forum!
Reply With Quote
  #7  
Old 17 Feb 2006, 17:53
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Originally Posted by Smiry Kin's
i no google is used by most forums, as there to little, but could you make a guide for targetpoint please?
You mean section targeting?

What is section targeting and how do I implement it?

Section targeting allows you to suggest sections of your text and HTML content that you'd like us to emphasize or downplay when matching ads to your site's content. By providing us with your suggestions, you can assist us in improving your ad targeting. We recommend that only those familiar with HTML attempt to implement section targeting.

To implement section targeting, you'll need to add a set of special HTML comment tags to your code. These tags will mark the beginning and end of whichever section(s) you'd like to emphasize or de-emphasize for ad targeting.

The HTML tags to emphasize a page section take the following format:

<!-- google_ad_section_start -->

<!-- google_ad_section_end -->

You can also designate sections you'd like to have ignored by adding a (weight=ignore) to the starting tag:

<!-- google_ad_section_start(weight=ignore) -->

With these tags added to your HTML code, your final code may look like the following:

<html><head><title>Section targeting</title></head>
<body>
<!-- google_ad_section_start -->

This is the text of your web page. Most of your content resides here.

<!-- google_ad_section_end -->
</body>
</html>
You can use section targeting to make suggestions about as many sections of a page as you like. However, please be aware that we can't guarantee results, and that it may take up to 2 weeks before our crawlers take into account any changes you've made to your site.

In order to properly implement this feature, you'll need to include a significant amount of content within the section targeting tags. Including insufficient content may result in less relevant ads or PSAs. In addition, please keep in mind that this feature should only be used to emphasize significant sections of your site's relevant content. It is against our program policies to manipulate the ad targeting to result in ads that are not relevant to the content of your pages.
Example:

Open your FORUMHOME template: vBulletin AdminCP > Styles & Templates > Edit Templates > Forum Home Templates > FORUMHOME

Find:
<!-- main -->
$forumbits
<!-- /main -->
Replace with:
<!-- google_ad_section_start -->
<!-- main -->
$forumbits
<!-- /main -->
<!-- google_ad_section_end -->
Find:
<!-- what's going on box -->
Add above:
<!-- google_ad_section_start(weight=ignore) -->
Find:
<!-- end what's going on box -->
Add below:
<!-- google_ad_section_end -->
(You can also try section targeting for your FORUMDISPLAY and SHOWTHREAD templates)

Originally Posted by TheComputerGuy
I wasn't 100% that you could make a post part of Googles ad. I thought someone got in trouble for that being it looks like original content.

This is one heck of a tutorial though!
Matching the colors and deep integrating the ads into your pages are google suggestions. The ads are stated as "Sponsored Links" or "Advertisements" so it won't be a problem.

Customize ads to complement your site.

You spend lots of time perfecting your website's look and feel, and we want AdSense to fit in. So we let you customize the appearance of your ads to fully complement your site by choosing from over 200 colors and 24 pre-set color palettes (you can create and save your own custom palettes using a simple point-and-click color selection tool.
__________________
MsXLabs Forum

Last edited by NeutralizeR; 17 Feb 2006 at 18:05.
Reply With Quote
  #8  
Old 18 Feb 2006, 00:56
10sion 10sion is offline
 
Join Date: Jul 2005
Simply amazing. Thank you so much.

I personally use Yahoo Publisher, but I'm sure I can still implement everything the same.
Reply With Quote
  #9  
Old 18 Feb 2006, 20:39
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Some More...

Open your FORUMHOME template: vBulletin AdminCP > Styles & Templates > Edit Templates > Forum Home Templates > FORUMHOME

Find:
<!-- what's going on box -->
Add above:
<table class="tborder" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="alt1" align="center">
&nbsp;<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "FF0000";
google_color_url = "000000";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>&nbsp;
</td>
</tr>
</table>
Save.

Open your MEMBERINFO template: vBulletin AdminCP > Styles & Templates > Edit Templates > Member Info Templates > MEMBERINFO

Find:
<if condition="$show['signature']">
Add above:
<table class="tborder" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="alt1" align="center">
&nbsp;<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "FF0000";
google_color_url = "000000";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>&nbsp;
</td>
</tr>
</table>
Save.

If you have vBadvanced installed:

Open your adv_portal template: vBulletin AdminCP > Styles & Templates > Edit Templates > vBadvanced CMPS Templates > adv_portal

Find:
$footer
Add above:
<center><script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "FF0000";
google_color_url = "000000";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
Save...
__________________
MsXLabs Forum
Reply With Quote
  #10  
Old 18 Feb 2006, 20:50
Citizen Citizen is offline
 
Join Date: Sep 2005
Who wants to make this into a plug-in?
__________________
Golevel
GunZ 2
Reply With Quote
  #11  
Old 18 Feb 2006, 20:54
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Originally Posted by Citizen
Who wants to make this into a plug-in?
Good question.

I don't have enough time to do it... maybe somebody around can make it for you.

Regards
__________________
MsXLabs Forum

Last edited by NeutralizeR; 21 May 2008 at 13:31.
Reply With Quote
  #12  
Old 28 Feb 2006, 18:57
applehat's Avatar
applehat applehat is offline
 
Join Date: Jun 2005
Real name: Cameron
pointsless to make a plugin to my knoladge...since a plugin doesn't do template mods...

I guess...it could be some sort of plugin...but template mods would have to be made still.
Reply With Quote
  #13  
Old 05 Mar 2006, 03:07
BeaLzeBuB's Avatar
BeaLzeBuB BeaLzeBuB is offline
 
Join Date: Mar 2006
Real name: hadi
I'm so sorry, but my English is too bad, i must speak own language....

NeutralizeR,

Bi iki sorum olacak sana, cevap verirsen çok memnun kalırım.
ilk başta yaptığın html dosyası ne için? O dosyanın amacı nedir? Bir de google aynı sayfada 2 reklama izin vermiyor bildiğim kadarıyla, yani header'a bir reklam koyunca aynı anda showthread'de de reklam varsa ikisinden biri gozukmuyor. Bunu nasıl aşarız? Yoksa o dosyanın amacı o mu?

Şimdiden teşekkür ederim...

Ayrıca siteni çok beğeniyorum, şu kısır zamanda en iyi rap parçaları sizden temin edebiliyorum. Bunun içinde teşekkürler..
Reply With Quote
  #14  
Old 05 Mar 2006, 04:07
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Originally Posted by BeaLzeBuB
I'm so sorry, but my English is too bad, i must speak own language....

NeutralizeR,

Bi iki sorum olacak sana, cevap verirsen çok memnun kalırım.
ilk başta yaptığın html dosyası ne için? O dosyanın amacı nedir? Bir de google aynı sayfada 2 reklama izin vermiyor bildiğim kadarıyla, yani header'a bir reklam koyunca aynı anda showthread'de de reklam varsa ikisinden biri gozukmuyor. Bunu nasıl aşarız? Yoksa o dosyanın amacı o mu?

Şimdiden teşekkür ederim...

Ayrıca siteni çok beğeniyorum, şu kısır zamanda en iyi rap parçaları sizden temin edebiliyorum. Bunun içinde teşekkürler..
html dosyası sayfa içeriğiyle ilgili reklam bulunamadığında reklam alanını yok etmek için kullanılıyor. Yani gereksiz yere alan kaplanmamış oluyor. Google bir sayfada maksimum üç adet reklam birimine izin veriyor. navbar, ilk mesaj, son mesaj... kural dışı bir durum söz konusu değil.

Saygılar

P.S. the questions were about collapsible ads and the ad units
__________________
MsXLabs Forum

Last edited by NeutralizeR; 05 Mar 2006 at 05:38.
Reply With Quote
  #15  
Old 05 Mar 2006, 05:23
BeaLzeBuB's Avatar
BeaLzeBuB BeaLzeBuB is offline
 
Join Date: Mar 2006
Real name: hadi
thank you NeutralizeR
Reply With Quote
Reply

Similar Article
Article Author Type Replies Last Post
Show Thread Enhancements Google Adsense Postbit Integration Atakan KOC vBulletin 3.8 Add-ons 80 08 May 2015 08:08
Integration with vBulletin CFM: Google AdSense for Search Integration Throtex vBulletin 3.6 Add-ons 80 05 Aug 2011 21:42
Show Thread Enhancements Google Adsense Postbit Integration Atakan KOC vBulletin 3.7 Add-ons 96 13 Mar 2010 17:37
Add-On Releases vB Google Adsense for Search plus Integration davidw vBulletin 3.6 Add-ons 171 27 May 2008 11:53



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

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


New To Site? Need Help?

All times are GMT. The time now is 08:58.

Layout Options | Width: Wide Color: