Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Google Adsense (or other) in a Block like an Individual Post Details »»
Google Adsense (or other) in a Block like an Individual Post
Version: 1.00, by Leo Brazil Leo Brazil is offline
Developer Last Online: Aug 2017 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.x Rating:
Released: 02-18-2010 Last Update: Never Installs: 30
Template Edits
Re-useable Code Translations  
No support by the author.

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 !

Screenshots

File Type: jpg postbitlegacy.jpg (41.8 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
sodasusu

Comments
  #12  
Old 03-09-2010, 12:41 PM
Alecsmith Alecsmith is offline
 
Join Date: Sep 2009
Location: Still On Earth
Posts: 217
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good job leo just install on look great
Reply With Quote
  #13  
Old 03-12-2010, 06:58 PM
Leo Brazil's Avatar
Leo Brazil Leo Brazil is offline
 
Join Date: Dec 2007
Location: Brazil
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you guys, glad you liked it.
Reply With Quote
  #14  
Old 08-27-2010, 01:16 AM
Lee Roberts's Avatar
Lee Roberts Lee Roberts is offline
 
Join Date: Jun 2008
Location: UK
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!.
Reply With Quote
  #15  
Old 08-27-2011, 06:33 PM
otectom otectom is offline
 
Join Date: Mar 2011
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just installed and works great, thank you.

View it at http://www.teamotec.net
Reply With Quote
  #16  
Old 02-21-2013, 12:29 PM
vimarc vimarc is offline
 
Join Date: Feb 2013
Location: SnappyFizz.com
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice mod but better to use with css syling instead editing every template
Reply With Quote
  #17  
Old 09-25-2013, 03:17 PM
Edgespeeder06 Edgespeeder06 is offline
 
Join Date: Nov 2009
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyway to added it before a thread starts at the top of the thread to just thread pages?
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 08:50 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05689 seconds
  • Memory Usage 2,285KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (1)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete