PDA

View Full Version : Adsense Under First Posts - Clean


Boguns
05-23-2006, 10:00 PM
This mod ads a simple google adsense advertisement below the first post in your forum.

The advantage of this is if you do not want to clutter up your forum with a big table etc.

Working Demo: http://discusscareers.com/

Installation Time: 1 min
Easy.

Insert this code at the very END of your postbit_legacy template

$spacer_open

<div align="center">

<!--ADSENSE CODE BELOW -->

</div>

$spacer_close
<br>

Boguns
05-24-2006, 09:25 PM
Here is a screenshot

Pathor
05-24-2006, 10:01 PM
$spacer_open

<div align="center">

<!--ADSENSE CODE BELOW -->

</div>

$spacer_close
<br />

;)

Roms
05-24-2006, 10:08 PM
$spacer_open

<div align="center">

<!--ADSENSE CODE BELOW -->

</div>

$spacer_close
<br />

;)

<br /> or <BR> isn't really a big deal....... ;)

Back in the day they tought everyone to use all caps too... :p

akanevsky
05-24-2006, 10:18 PM
<br /> or <BR> isn't really a big deal....... ;)

Back in the day they tought everyone to use all caps too... :p

Yes it is, because vBulletin is mostly XHTML-compliant. :)
As for caps, that is ancient history :)

SixteenOhNine
05-24-2006, 10:28 PM
While <br> and <br /> will work the same, one will validate and one won't. Given you are one of the many that wishes to maintain validity throughout your website, you'd need to use <br /> :).

Roms
05-24-2006, 10:30 PM
Yes it is, because vBulletin is mostly XHTML-compliant. :)
As for caps, that is ancient history :)

Tells you how "old school" I am. Good to know. :)

akanevsky
05-24-2006, 11:03 PM
While <br> and <br /> will work the same, one will validate and one won't. Given you are one of the many that wishes to maintain validity throughout your website, you'd need to use <br /> .

Didn't you mean "of the few"?

Freesteyelz
05-24-2006, 11:25 PM
Let's take it one step further then, shall we :) :


$spacer_open
<div style="text-align:center">
<!--ADSENSE CODE BELOW -->
</div>
$spacer_close
<br />

Living in music
05-25-2006, 01:02 AM
Lolz!

Kaleem
05-25-2006, 02:36 AM
thanks man i didt like the random one that we have it already on the forum

Snake
05-25-2006, 07:12 PM
Thanks for this man! :)

tgreer
05-25-2006, 07:23 PM
Also, Google Adsense uses "documet.write()", which isn't part of the XHTML specification. So while I agree that one should use "<br />", since this is a Google Adsense hack, it's pointless to try to be XHTML-valid in the first place.

mathias
05-25-2006, 09:07 PM
it post the ad under every post.... Is it just supposed to be first?

azn_romeo_4u
05-26-2006, 07:08 AM
this mod does not work. It ads it under every post. Viewsource and you will see the adsense ad code multiple times. This is against Adsense TOS.

nymyth
06-13-2006, 01:13 PM
^^adding it under each post for me too.....any ideas??

Peace

Netdesignz
06-14-2006, 09:59 AM
Great Mod. Worked for me and only puts ads after first post.
Installed :)

UZFRED
06-14-2006, 04:49 PM
Very nice mod!

But I have one problem. I got this installed without problems on 2 custom templates, but on the default template the following problem occurs:

https://vborg.vbsupport.ru/attachment.php?attachmentid=49405&stc=1&d=1150307264

A grey space appears underneath it.

Can anybody please help me!

I have no other template modifications, I hope there is a fix for it.

neologan
06-18-2006, 06:17 PM
adds it under every post for me too...

patrickstar
06-20-2006, 12:26 AM
i get it under the first two post.

????

patrickstar
06-20-2006, 12:40 AM
ok got it to work, looks great. thanks.

dont know if anyone was doing what i did wrong but i had to make sure i removed all of this: <!--ADSENSE CODE BELOW -->

ReadOrDie
07-21-2006, 01:41 AM
Finally! A code that works! There's about four things I've tried in this forum that don't work at all, it seems as though the creators don't bother testing their hacks before they post them. Is there a way to have it display under each post instead of just one?

GoTTi
07-22-2006, 08:20 PM
why when using firefox, and there is a new post done after the first post and the banner shows, does the page reload to a white page and never show the thread?

Wills123
07-25-2006, 09:39 AM
Hi

I have just loaded this onto my website (www.newbusinessportal.co.uk), but the ads aren't showing. Is this because it takes a while for google to realise that you have added the code?

Thanks

Will

odessa
06-15-2011, 07:22 PM
work in the first and the seconds !!
i need only under First Posts?