vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Google Adsense (or other) in a Block like an Individual Post (https://vborg.vbsupport.ru/showthread.php?t=236313)

Leo Brazil 02-18-2010 10:00 PM

Google Adsense (or other) in a Block like an Individual Post
 
1 Attachment(s)
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.

Code:

<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/24...post15784.html

Switch3130 02-19-2010 11:12 PM

Nice work.

Leo Brazil 02-23-2010 01:06 PM

Quote:

Originally Posted by Kolbi (Post 1986497)
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.

Quote:

Originally Posted by Bouncer222 (Post 1986535)
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/showthrea...04#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?


All times are GMT. The time now is 05:54 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01078 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete