Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Show Adsense After post number "x" and "x" Details »»
Show Adsense After post number "x" and "x"
Version: 1.00, by mcyates mcyates is offline
Developer Last Online: Jul 2022 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.6.4 Rating:
Released: 02-02-2007 Last Update: Never Installs: 29
Template Edits
 
No support by the author.

Works With Vbulletin V3.7.2

This is a very simple template modification have similar to absence hack and the random postbit advert hack. But you have more control with this hack as you change the option for where the adverts will appear "after which message"

Add one of these codes to the bottom of your postbit template.

Here are the codes:

Code:
<if condition="$post[postcount]==1">
<p align="center">

[AD CODE GOES HERE]

</p>
</if>
The above code would show an ad after the first post on every thread. Change this number to show the advert under a different post. Or use loads together like this:

Code:
<if condition="$post[postcount]==1">
<p align="center">

[AD CODE GOES HERE]

</p>
</if>

<if condition="$post[postcount]==10">
<p align="center">

[AD CODE GOES HERE]

</p>
</if>

<if condition="$post[postcount]==20">
<p align="center">

[AD CODE GOES HERE]

</p>
</if>
The above will show adverts after the 1st, 10th and 20th post in every thread.

Also there is another way for doing this:

Code:
<if condition="in_array($post['postcount'], array(1, 5, 10, 15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100))">
<if condition="in_array($bbuserinfo['usergroupid'], array(1, 2, 3, 4,5,6,7,8, 9))">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="thead" align="left">Sponsored Links (<a href=/payments.php>No Ads</a>)</td>
</tr>
<tr>
	<td class="alt1" align="center">

[AD CODE GOES HERE]

	</td>
</tr>
</table>

</div>
$spacer_close

</if></if>
Enjoy!!

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-03-2007, 05:28 PM
rezapci rezapci is offline
 
Join Date: May 2004
Location: U.S.K.C.
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

awesome Reserved
Reply With Quote
  #3  
Old 03-02-2007, 07:58 PM
2 FN LOW 2 FN LOW is offline
 
Join Date: Feb 2007
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any idea how to get rid of this space?



heres the code i added at the bottom

Quote:
<if condition="in_array($post['postcount'], array(5,15,25, 35,45,55,65,75,85,95,100,115,125,135,145,155,165,1 75,185,195,205))">
<if condition="in_array($bbuserinfo['usergroupid'], array(1, 2, 3, 4,5,6,7,8, 9))">
$spacer_open

<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
<td class="alt1" align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-5795442351285075";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "34383C";
google_color_bg = "34383C";
google_color_link = "FFFFFF";
google_color_text = "999999";
google_color_url = "999999";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
$spacer_close
</if></if>
would like to click install if i can get this space removed and have it sit flush like it does on the top..Either that or give it a space at the top like the bottom...I would prefer no space at all though
Reply With Quote
  #4  
Old 03-05-2007, 07:39 PM
JJH35 JJH35 is offline
 
Join Date: Aug 2004
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that screenshot is hardly viewable...
Reply With Quote
  #5  
Old 03-09-2007, 10:13 AM
cddw.ltd cddw.ltd is offline
 
Join Date: Aug 2004
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JJH35 View Post
that screenshot is hardly viewable...
Take the .th. out before the .jpg and you get the full image -



Reply With Quote
  #6  
Old 03-10-2007, 09:04 AM
mcyates mcyates is offline
 
Join Date: Jan 2003
Location: Middlesbrough, Cleveland
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The space is the natural space that happens between each post. I'll try to add a space to the top of the advert for you.
Reply With Quote
  #7  
Old 03-10-2007, 02:26 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$spacer_open and $spacer_close is the problem.
Reply With Quote
  #8  
Old 03-11-2007, 07:42 AM
mcyates mcyates is offline
 
Join Date: Jan 2003
Location: Middlesbrough, Cleveland
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried to remove them but it didn't help. There was still a gap on the bottom side.
Reply With Quote
  #9  
Old 03-14-2007, 06:23 PM
Xtrm2Matt Xtrm2Matt is offline
 
Join Date: Aug 2002
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Simply add <br /> before $spacer_open. Example:
<br />
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
Reply With Quote
  #10  
Old 03-14-2007, 08:45 PM
starww starww is offline
 
Join Date: Mar 2007
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its really a useful stuff !

thanks for sharing
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 03:01 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.04685 seconds
  • Memory Usage 2,298KB
  • Queries Executed 24 (?)
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
  • (3)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete