Log in

View Full Version : Mini Mods - Google Adsense (or other) in a Block like an Individual Post


Leo Brazil
02-18-2010, 10:00 PM
This is for you that don't like how vB standard ad management works as a matter of delivery ads inside the posts in a thread. You know, it may looks disrespectful for someone that posted a great material in a thread but have to share its space with adsenses.

I've tested it only on Postbit Legacy so far but I don't think that's a reason for not working on Postibit as well.

It's a pretty simple template edit.

Just find your Postbit Legacy or Postbit Template and add the code below, right at the end of the template, click save and it's done.


<vb:if condition="$post[postcount] % $vboptions[maxposts] == 1">
<div class="postbit">
<h3 class="posthead">&nbsp; &nbsp;Sponsored Links</h3>
<div class="postbody">--YOUR ADSENSE CODE GOES HERE --</div>
</div>
<br />
</vb:if>


Just don't forget to replace "--YOUR ADSENSE CODE GOES HERE --" with your own adsence code before saving your postibit template. Work also with images or whatever you want.

I'm still trying to figure out how vB conditionals work and so far I've did it only to show it after the first post everywhere. I'm sure if you are familiar with that and use different ones on the first line of the code, you can be able to show this on specific forums, different positions, etc.
If you know how to do it, please share what you tried with others here.

If you like it, mark it as Installed please !

Kolbi
02-19-2010, 02:32 PM
Good idea but your template modification creates a lot of xhtml issues...

Bouncer222
02-19-2010, 03:22 PM
images?

Kolbi
02-19-2010, 03:34 PM
I?m using nearly the same code as posted here: http://www.2-wheel-planet.de/ebay/2442-aprillia-rs125-leichtkraftrad-motorrad-yzf-tzr-cbr-gsx-post15784.html

Switch3130
02-19-2010, 11:12 PM
Nice work.

Leo Brazil
02-23-2010, 01:06 PM
Good idea but your template modification creates a lot of xhtml issues...

Strange, I don't have any xhtml issues on mine. I used exactly the same vb postibit logic to do this, pretty simple.

images?

My images won't help you much as in fact I don't use adsenses with this but in fact banners I manage my self with phpadsnew

But you'll have exactly after first post in thread a box with your adsense into it, looking exactly your postbit (or legacy) frame, with same colors you used on your forums. Not a big deal.

If some one here using adsenses wants to share a screenshot, I'd please in add it to the first post here.

khalled
03-03-2010, 11:40 PM
dear Leo Brazil can help in that threads

https://vborg.vbsupport.ru/showthread.php?p=1996504#post1996504

Leo Brazil
03-04-2010, 06:23 PM
You got it Khalled: https://vborg.vbsupport.ru/showthread.php?t=237502

Leo Brazil
03-05-2010, 06:23 PM
Screen shot added.

patrick91
03-07-2010, 07:40 PM
Just installed right now! mark as installed and rate 5stars! keep up the good work... peace;)

Alecsmith
03-09-2010, 12:41 PM
good job leo just install on look great :)

Leo Brazil
03-12-2010, 06:58 PM
Thank you guys, glad you liked it.

Lee Roberts
08-27-2010, 01:16 AM
Thanks Leo, just what i was looking for thank you!

If i have some ideas on the "conditionals" i will let you know.

Your right about "for someone that posted a great material in a thread but have to share its space with adsenses", we should not treat contributing members like this.

Especially if we want to be responsible for a successful site, however you could also show ads only to User Groups!.

otectom
08-27-2011, 06:33 PM
Just installed and works great, thank you.

View it at http://www.teamotec.net

vimarc
02-21-2013, 12:29 PM
nice mod but better to use with css syling instead editing every template

Edgespeeder06
09-25-2013, 03:17 PM
anyway to added it before a thread starts at the top of the thread to just thread pages?