vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=107965

vBulletin Google Adsense Deep Integration Tutorial
by NeutralizeR
14 Feb 2006 15:02

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:

Quote:

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:
Quote:

<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:
Quote:

<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:
http://img234.imageshack.us/img234/9625/snap17ub.gif

http://img234.imageshack.us/img234/2651/snap21my.gif


(for the ad unit)

Find:
Quote:

<!-- / PAGENAV POPUP -->
</if>
Add below:
Quote:

<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:
http://img426.imageshack.us/img426/4695/snap36cz.gif

http://img153.imageshack.us/img153/7584/snap43oi5wb.gif

Save.



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

(First thread)

Find:
Quote:

<if condition="$show['threads']">
Add below:
Quote:

<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:
Quote:

<!-- end show threads -->
Add below:
Quote:

<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:
http://img383.imageshack.us/img383/6998/snap58lv.gif

http://img109.imageshack.us/img109/7800/snap68am.gif

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:
Quote:

$searchbits

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

<else />
Add below:
Quote:

<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:
Quote:

</tr>
$searchbits
Add below:
Quote:

<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:
http://img302.imageshack.us/img302/9012/snap98ab.th.gif

http://img302.imageshack.us/img302/1894/snap104dt.gif

Save.


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

(First post and last shown post)

Find:
Quote:

<!-- / message -->
Add below:
Quote:

<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:
https://www.vbulletin.org/forum/

http://img441.imageshack.us/img441/8657/snap87bw.th.gif


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

Snake 14 Feb 2006 15:13

Wow thanks man, this is a great tutorial! :D

The Chief 14 Feb 2006 15:29

wow, thats an awesome tutorial, thanks so much!!

Developer 16 Feb 2006 19:46

Very nice thnx i wish there is install button :)

Smiry Kin's 17 Feb 2006 14:35

i no google is used by most forums, as there to little, but could you make a guide for targetpoint please?

TheComputerGuy 17 Feb 2006 17:27

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!

NeutralizeR 17 Feb 2006 17:53

Quote:

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?

Quote:

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:
Quote:

<!-- main -->
$forumbits
<!-- /main -->
Replace with:
Quote:

<!-- google_ad_section_start -->
<!-- main -->
$forumbits
<!-- /main -->
<!-- google_ad_section_end -->
Find:
Quote:

<!-- what's going on box -->
Add above:
Quote:

<!-- google_ad_section_start(weight=ignore) -->
Find:
Quote:

<!-- end what's going on box -->
Add below:
Quote:

<!-- google_ad_section_end -->
(You can also try section targeting for your FORUMDISPLAY and SHOWTHREAD templates)

Quote:

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.

Quote:

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.

10sion 18 Feb 2006 00:56

Simply amazing. Thank you so much. :)

I personally use Yahoo Publisher, but I'm sure I can still implement everything the same.

NeutralizeR 18 Feb 2006 20:39

Some More...

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

Find:
Quote:

<!-- what's going on box -->
Add above:
Quote:

<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:
Quote:

<if condition="$show['signature']">
Add above:
Quote:

<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:
Quote:

$footer
Add above:
Quote:

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

Citizen 18 Feb 2006 20:50

Who wants to make this into a plug-in? :D

NeutralizeR 18 Feb 2006 20:54

Quote:

Originally Posted by Citizen
Who wants to make this into a plug-in? :D

Good question.

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

Regards

applehat 28 Feb 2006 18:57

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.

BeaLzeBuB 05 Mar 2006 03:07

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

NeutralizeR 05 Mar 2006 04:07

Quote:

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

BeaLzeBuB 05 Mar 2006 05:23

thank you NeutralizeR

dartworth 05 Mar 2006 17:31

thanks...:)

busybeeburns 06 Mar 2006 16:24

Hi

I seem to be having trouble with the FORUMDISPLAY integration - the code seems to be working as there is a correct layout at the top of the forum, but the google adsense banner does not show.

NeutralizeR 06 Mar 2006 16:31

Quote:

Originally Posted by busybeeburns
Hi

I seem to be having trouble with the FORUMDISPLAY integration - the code seems to be working as there is a correct layout at the top of the forum, but the google adsense banner does not show.

Try removing the google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html"; line to test...

markbolyard 06 Mar 2006 16:31

Remember however if you have multiple areas for which you are showing adsense on one page, but google doesn't have enough ads to fill all the spots based on your content, then that area will be blank. Give Google a little time to optimize it's ads for your content, then the ads will most likely show unless your forum content is so obscure that there are not many advertisers in that area.

busybeeburns 06 Mar 2006 16:58

Ah thanks Mark, I realised it was because I already had a landscape banner at the top. Removing it allowed the FORUMDISPLAY banner to work. :)

Blaine0002 10 Mar 2006 14:57

i can make as much of it into a plugin as possible if you guys want :)

djr 13 Mar 2006 02:39

Very useful info here, thanks for the tutorial!

m_k 15 Mar 2006 18:20

great information - thanks for sharing this NeutralizeR...

I have tried out most of the ideas, and have settled on using the forumdisplay ads and the two for search results

forumdisplay is working great, but for some reason search results just comes back with collapsible ads all the time - I cut and pasted the code exactly, so can't figure out what isn't working

NeutralizeR 15 Mar 2006 21:23

Quote:

Originally Posted by m_k
great information - thanks for sharing this NeutralizeR...

I have tried out most of the ideas, and have settled on using the forumdisplay ads and the two for search results

forumdisplay is working great, but for some reason search results just comes back with collapsible ads all the time - I cut and pasted the code exactly, so can't figure out what isn't working

:) try different searches... it'll be enough to see the ads once...
Quote:

Originally Posted by markbolyard
Remember however if you have multiple areas for which you are showing adsense on one page, but google doesn't have enough ads to fill all the spots based on your content, then that area will be blank. Give Google a little time to optimize it's ads for your content, then the ads will most likely show unless your forum content is so obscure that there are not many advertisers in that area.


post bit legacy
by raagaswaram
16 Mar 2006 01:27

everything works fine except the postbitlegacy part i inserted the code but itz not displaying?

Reef 16 Mar 2006 02:10

Excellent post NeutralizeR

I have a small problem though.... For some reason no matter what I try, only one add will display on any page.. If I add a second one anywhere it will not appear..

Any idea what that might be?

EDIT: nevermind I just now saw your explaination above... Sorry I missed it before

I will wait to see if they will populate later on

Thanks for the great work with this

hotrod1 19 Mar 2006 02:27

Excellent article, thanks alot!

Adsense - Show Single Post
by NeutralizeR
19 Mar 2006 04:49

If you allow search engines to spider the single versions of your posts (This post, for example... showpost.php), you may want to use adsense ads on this template, too. I think you don't want to miss any possible renevue...

Open your SHOWTHREAD_SHOWPOST template: vBulletin AdminCP > Styles & Templates > Edit Templates > Show Thread Templates > SHOWTHREAD_SHOWPOST

Find:

Quote:

$postbits
Add above:
Quote:

<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>
(Or just the <script> section if you don't want the table.)

You can also add this code after $postbits if you want a second ad unit.

zkilzz 20 Mar 2006 19:37

Quote:

Originally Posted by Blaine0002
i can make as much of it into a plugin as possible if you guys want :)

Hey!
I really want a plugin! Is it fare away?

Marius

thecool 28 Apr 2006 15:34

Is there a way to place the ads randomly within the ForumDisplay as opposed to the first and last post?

similar to this:
http://www.aywe.com/news-announcements/

NeutralizeR 11 May 2006 05:47

Google Adsense Products All in One @ navbar with rotating highlight images on the left side of the ads: http://www.msxlabs.org/forum/

Try switching between pages or refresh... I can post about it if you like.

Langly 12 May 2006 21:41

How can I make my search button only be my google search and remove the vbulletin search? Right now I have the header dropdown for search showing vbulletin search and below that is my google search.

deep_blue 15 May 2006 17:24

Hi

I am unable to do required modification as am getting parse error on account of php.

Following msg is coming "


Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/coolaven/public_html/forums/includes/adminfunctions_template.php(3537) : eval()'d code on line 41

what to do

deep_blue 18 May 2006 17:07

Is Anybody Out There

NeutralizeR 18 May 2006 17:49

Quote:

Originally Posted by deep_blue
Is Anybody Out There

Which template and what code modification are you trying to do?

deep_blue 19 May 2006 18:35

I tried to edit FORUMDISPLAY template and post coes to get google ad on forum display pages but got this error

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/coolaven/public_html/forums/includes/adminfunctions_template.php(3537) : eval()'d code on line 41

Is my VB got corrupt

NeutralizeR 19 May 2006 18:46

Quote:

Originally Posted by deep_blue
I tried to edit FORUMDISPLAY template and post coes to get google ad on forum display pages but got this error

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/coolaven/public_html/forums/includes/adminfunctions_template.php(3537) : eval()'d code on line 41

Is my VB got corrupt

Does it happen everytime when you try to login admincp?
Turn off the product-plugin system...
Try disabling plugins one by one and re-enable them to figure out which one causes this error...

I've rechecked the codes in my messages and they seem to be ok.

Langly 20 May 2006 02:42

Quote:

Originally Posted by Langly
How can I make my search button only be my google search and remove the vbulletin search? Right now I have the header dropdown for search showing vbulletin search and below that is my google search.

Any way to do this?

NeutralizeR 27 May 2006 14:19

Quote:

Originally Posted by Langly
Any way to do this?

Search vbulletin.org, there must be a mod for what you want.

ferreo 27 May 2006 22:10

Excellent post, thank you very much for sharing. I'll post results later.

Dan 27 May 2006 22:20

Interesting guide on placement of Adsense ads, very useful. Might even use a few of the locations you suggested :) Thanks

obmob 02 Jun 2006 16:51

XD i was trying to click "install" button, very useful, not only for vB pages.

thanks

version2 02 Jun 2006 18:29

Damn, that forum is way too annoying. Sorry, not trying to be an ass....just too busy...too much stuff moving around.

NeutralizeR 03 Jun 2006 01:31

Quote:

Originally Posted by version2
Damn, that forum is way too annoying. Sorry, not trying to be an ass....just too busy...too much stuff moving around.

Thank you :)

forumdisplay and postbit ads are working great
by NeutralizeR
09 Jun 2006 13:10

RECOMMENDED

Results:
http://img135.imageshack.us/img135/2866/snap17va.th.gif

http://img119.imageshack.us/img119/2517/snap21ew.th.gif

BLazeD1 21 Jun 2006 04:04

Can someone post results with this please?

Thank you!

webgroup 30 Jun 2006 17:19

Quote:

Originally Posted by deep_blue
I tried to edit FORUMDISPLAY template and post coes to get google ad on forum display pages but got this error

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/coolaven/public_html/forums/includes/adminfunctions_template.php(3537) : eval()'d code on line 41

Is my VB got corrupt


Same here, it happens when trying to edit the templates.
Vbulletin warns you of the error and let you choose to go back or continue anyways.
I tried in 2 forums with 3.5.4

With both FORUMDISPLAY and POSTBIT

NeutralizeR 30 Jun 2006 19:54

Quote:

Originally Posted by webgroup
Same here, it happens when trying to edit the templates.
Vbulletin warns you of the error and let you choose to go back or continue anyways.
I tried in 2 forums with 3.5.4

With both FORUMDISPLAY and POSTBIT

Copy the codes to your text editor first and check for any special characters possibly added by vBulletin... and re-check your google adsense codes.

BTW, I've upgraded my forum to vb 3.6 Beta 3 and it seems this guide doesn't need to be updated.

Regards

webgroup 30 Jun 2006 20:17

Quote:

Originally Posted by NeutralizeR
Copy the codes to your text editor first and check for any special characters possibly added by vBulletin... and re-check your google adsense codes.

BTW, I've upgraded my forum to vb 3.6 Beta 3 and it seems this guide doesn't need to be updated.

Regards


I'm getting the error by just pasting the initial part of the code.

Just by pasting this in the FORUMDISPLAY:

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


NeutralizeR 30 Jun 2006 20:21

*edit*

It seems ok... Can you try editing your templates via another browser?

Martin64 07 Jul 2006 04:14

Excellent little tutorial, cheers. :)

Also, here's a little tip in case you only want to display it for guests, not members. Simply put the codes (as instructed in the first posts) between these tags:

<if condition="!$bbuserinfo[userid]">

*code*

</if>

Macktr 13 Jul 2006 10:52

thank you NeutralizeR

dsmoke 29 Jul 2006 13:04

this looks amazing can anyone say that their adsense revenue went up x% after doing this?

sportsoutlaw 29 Jul 2006 19:34

yes, I can say it did.

I didn't use this exactly though.

I still use a leaderboard below the navbar in showthread and above quick reply.
I am doing this in place of the DAI tutorial section that places adsense directly inside a members post. I didn't feel comfortable with that portion of the tutorial. (just my personal preference, not knocking it in any way)

DeepXP 15 Aug 2006 00:01

sorry to bump topic like this but the guide mentioned for first and last post ads does not work well with vbulletin 3.6

it shows ads in first 3 posts in the thread....

NeutralizeR 15 Aug 2006 00:30

Quote:

Originally Posted by DeepXP
sorry to bump topic like this but the guide mentioned for first and last post ads does not work well with vbulletin 3.6

it shows ads in first 3 posts in the thread....

Not tested yet but these conditionals should still work:

Quote:

<if condition="(($post[postcount]==1) or ($post[islastshown]))">
*ad*
</if>
Quote:

<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">
*ad*
</if>

DeepXP 15 Aug 2006 00:38

That was QUICK!!!

The first condition worked....


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

Thanks
Deep

DeepXP 16 Aug 2006 12:39

OKay I am back, try the 2nd condition if you have AJAX Quick reply enabled...


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

if you try first then it shows blank page once you reply usuing quick reply option...

feel good after doing that!!
by ish
23 Aug 2006 14:56

WOW! absolutely amazing - i got this to work! a deep feelgood moment taking place :) thankyou.

and thank for this too martin64:
Quote:

Originally Posted by Martin64
Also, here's a little tip in case you only want to display it for guests, not members. Simply put the codes (as instructed in the first posts) between these tags:

<if condition="!$bbuserinfo[userid]">

*code*

</if>


bbcentral 25 Aug 2006 13:51

Great tutorial!
I will use some of the info, but no matter how much money NeutralizeR is making off his forum, nothing will convince me to make my members suffer like that. Sorry man, the site is plain shocking. I care about my members far too much to make them go through an epileptic-fit-inducing experience like your site. My browser struggled to scroll down!
Anyway, at least you've given us lots of examples to check out, very much appreciated! :D

NeutralizeR 25 Aug 2006 15:23

Quote:

Originally Posted by bbcentral
Great tutorial!
I will use some of the info, but no matter how much money NeutralizeR is making off his forum, nothing will convince me to make my members suffer like that. Sorry man, the site is plain shocking. I care about my members far too much to make them go through an epileptic-fit-inducing experience like your site. My browser struggled to scroll down!
Anyway, at least you've given us lots of examples to check out, very much appreciated! :D

You are welcome :)

Yes, i don't know who visits and registers my web site but they are really insistent on that :P Google likes me...

doushx 26 Aug 2006 18:56

greatly thanks

J-TEK 02 Sep 2006 01:10

Nice work, seems great.

Klaymen TK 02 Sep 2006 23:27

Really [for 1000] great tutorial. Really [for others 1000] thanks!

And your members doesn't even notice your ads anymore?
by NeutralizeR
11 Sep 2006 10:35

And your members doesn't even notice your ads anymore?

Then change the ad colors while keeping the default colors for the visitors.

Quote:

google_color_border = <if condition="$show['guest']">"CDE7FF";<else />["CDE7FF","FFFF00","011160","FF0000"];</if>
google_color_bg = <if condition="$show['guest']">"CDE7FF";<else />["CDE7FF","011160","FFFFE1","FFFFFF"];</if>
google_color_link = <if condition="$show['guest']">"FF0000";<else />["FF0000","FFFF00","FF0000","FF0000"];</if>
google_color_url = <if condition="$show['guest']">"000000";<else />["000000","FFFFFF","000000","000000"];</if>
google_color_text = <if condition="$show['guest']">"0000A0";<else />["0000A0","FFFFFF","0000A0","0000A0"];</if>
Quote:

<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>
Example:
Quote:

<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 = <if condition="$show['guest']">"CDE7FF";<else />["CDE7FF","FFFF00","011160","FF0000"];</if>
google_color_bg = <if condition="$show['guest']">"CDE7FF";<else />["CDE7FF","011160","FFFFE1","FFFFFF"];</if>
google_color_link = <if condition="$show['guest']">"FF0000";<else />["FF0000","FFFF00","FF0000","FF0000"];</if>
google_color_url = <if condition="$show['guest']">"000000";<else />["000000","FFFFFF","000000","000000"];</if>
google_color_text = <if condition="$show['guest']">"0000A0";<else />["0000A0","FFFFFF","0000A0","0000A0"];</if>
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
Visitors will always see the ads in their default colors.

Members will see them in four rotating color combinations.


Test Account @ My forum:
Username: Tester
Password: asd123

http://www.msxlabs.org/forum/

VBUsers 11 Sep 2006 23:13

how can i put my google adsense after every first post of a page? when i add it it shows under every post instead of just the first one on that page.

dougeetx 11 Sep 2006 23:21

Quote:

Originally Posted by AR Forums
how can i put my google adsense after every first post of a page? when i add it it shows under every post instead of just the first one on that page.


There's another thread that tells how to do that. Look on my site at http://www.RealityTVFriends.com/forum and you'll see how it works.

VBUsers 11 Sep 2006 23:27

Quote:

Originally Posted by dougeetx
There's another thread that tells how to do that. Look on my site at http://www.RealityTVFriends.com/forum and you'll see how it works.

do you happen to know where the thread is? nice site by the way. hope it goes good for you.

NeutralizeR 12 Sep 2006 05:14

Quote:

Originally Posted by AR Forums
how can i put my google adsense after every first post of a page? when i add it it shows under every post instead of just the first one on that page.

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

(First post and last shown post)

Find:
Quote:

<!-- / message -->
Add below:
Quote:

<if condition="(($post[postcount]==1) 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

VBUsers 12 Sep 2006 19:54

Quote:

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

(First post and last shown post)

Find:

Add below:


Save.
http://www.vbulletin.org/forum/showp...30&postcount=7

great post and it works some what but i really wanted to look like a post and on every page in the thread. is there a way to do that?

IngoPan 13 Sep 2006 11:50

Quote:

Originally Posted by AR Forums
great post and it works some what but i really wanted to look like a post and on every page in the thread. is there a way to do that?


maybe try this: http://www.vbulletin.org/forum/showt...ghlight=banner

R.Solutions 16 Sep 2006 07:25

anyway any of this can be converted into 3.6.0?

NeutralizeR 16 Sep 2006 09:17

Quote:

Originally Posted by R.Solutions
anyway any of this can be converted into 3.6.0?

You can use this guide on vb 3.6, too.

R.Solutions 16 Sep 2006 19:44

I tried it, it expands my forums badly. Any way around this.

NeutralizeR 16 Sep 2006 19:50

Quote:

Originally Posted by R.Solutions
I tried it, it expands my forums badly. Any way around this.

Which template did you edit? Which part of the guide did you apply?

Please paste the code here...

Skyline_GT 23 Sep 2006 09:52

very nice tutorial. Thanks.

spipo 23 Sep 2006 12:32

how can I put adsense before the First post of every thread . 3.5.4
I mean ads before the first post ( and not after) ..
thanks

NeutralizeR 30 Sep 2006 16:42

Quote:

Originally Posted by spipo
how can I put adsense before the First post of every thread . 3.5.4
I mean ads before the first post ( and not after) ..
thanks

Open your SHOWTHREAD template,
Find:
Quote:

<!-- / toolbar -->
Add below:
Quote:

<center>
<< adsense codes comes here >>
</center>
Save.

Your PM request:
http://img509.imageshack.us/img509/3324/ggggmg8.jpg
:)

spipo 30 Sep 2006 16:53

thanks man i will try it

Smoothie 30 Sep 2006 22:20

Ok, next easy question. Where in showthread template to add adsense directly after last post, attached to it, similar to the first post. I assume you would need a conditional to show this?

NeutralizeR 30 Sep 2006 23:43

Quote:

Originally Posted by Smoothie
Ok, next easy question. Where in showthread template to add adsense directly after last post, attached to it, similar to the first post. I assume you would need a conditional to show this?

Open your SHOWTHREAD template,
Find:
Quote:

<!-- / start content table -->
Add below:
Quote:

<center>
<< adsense codes comes here >>
</center>
Save.

Smoothie 01 Oct 2006 05:32

Quote:

Originally Posted by NeutralizeR
Open your SHOWTHREAD template,
Find:

Add below:

Save.

That didn't seem to work. There's a slight gap between the end of the postbit and the ad.

How do I combine these condtionals?


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


NeutralizeR 01 Oct 2006 05:56

Quote:

Originally Posted by Smoothie
That didn't seem to work. There's a slight gap between the end of the postbit and the ad.

How do I combine these condtionals?


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

Check the first post, it's in the postbit template.

You need this conditional:
Quote:

<if condition="!$post['islastshown']">

</if>
This should work.

Smoothie 01 Oct 2006 05:59

2 Attachment(s)
Quote:

Originally Posted by NeutralizeR
Open your SHOWTHREAD template,
Find:

Add below:

Save.

Found where to add it. Here's the bottom and top.

Smoothie 01 Oct 2006 06:01

Quote:

Originally Posted by NeutralizeR
Check the first post, it's in the postbit template.

You need this conditional:


This should work.

Yes, but I need to combine them both into one, but not sure how to do that.

NeutralizeR 01 Oct 2006 06:03

I think it should work that way, too.

Quote:

<if condition="!in_array($forum[forumid], array(14,19))">
<if condition="$post[islastshown]">
<<---ads--->>
</if>
</if>
Try this:
Quote:

<if condition="(!$post['islastshown']) and !in_array($forum[forumid], array(14,19))">
<<---ads--->>
</if>

lowlight 01 Oct 2006 18:30

Is there an update for 3.6? The tables in my forum are shifted to the right now in thread view.

NeutralizeR 01 Oct 2006 19:41

Quote:

Originally Posted by lowlight
Is there an update for 3.6? The tables in my forum are shifted to the right now in thread view.

Which template edit did you use and which code?

All edits should be ok with vBulletin 3.6 series.

Smoothie 02 Oct 2006 02:15

Quote:

Originally Posted by NeutralizeR
I think it should work that way, too.



Try this:

Thanks!

rezapci 12 Oct 2006 08:07

do we have any for yahoo publisher?

NeutralizeR 12 Oct 2006 15:49

Quote:

Originally Posted by rezapci
do we have any for yahoo publisher?

I don't use Yahoo Publisher but you can apply the same template edits if the ad sizes are matching.

farukcan 15 Oct 2006 07:18

thank you... :)

teknoledge 24 Oct 2006 06:08

How to implement adsense in the same style as in forumshow template but for forumhome?

NeutralizeR 24 Oct 2006 12:53

Quote:

Originally Posted by teknoledge
How to implement adsense in the same style as in forumshow template but for forumhome?

http://www.vbulletin.org/forum/showp...31&postcount=9

popiul99 25 Oct 2006 05:33

ok so i integrated this in my forum www.ps3center.net/forums .. but I tweaked it a little .. I added the logo`s around it etc. Do you guys think this is against Google`s TOS ? What would you guys do? Keep it or take it off .. I dont wanna get banned from Adsense ...

soletrader 26 Oct 2006 05:12

How would I make it viewable by certain usergroups only? Thanks

yesfans 26 Oct 2006 16:51

This not real clear, to me anyways. I want to put my ads in between the posts in a thread. So instead of the ads being at the top of the site pages as it is now. Take them from there have them show in the threads. When some one opens a thread and they cruz thru the posts, there would be my ads in them, between the posts.

On my site, the posts are in sep boxes with a space between them. Anyway to code the Google ads to fit in between them, another box, that flows with the posts?

teknoledge 03 Nov 2006 07:47

Quote:

Originally Posted by NeutralizeR

Obviously I wasnt clear enough :P...

I want to integrate adsense 236x60 half banner into the forum list on forumhome page....

EXAMPLE:
  • General Forum
    • Forum1
    • Forum2
    • Adsense banner (to be displayed as forum category ;) )
    • Forum3
    • ...

imported_infitech 13 Nov 2006 10:53

this is great

lazydesis 15 Nov 2006 22:54

google banned my website cuz I used this ..wudnt recommend this for google ..but other ad networks are fine i guess ...great hack meanwhile :)


All times are GMT. The time now is 15:23.

Powered by vBulletin® Version 3.8.14
Copyright © 2023, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.