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

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

Version: 3.5.7 Rating:
Released: 11-18-2005 Last Update: 02-02-2007 Installs: 18
Template Edits
 
No support by the author.

This is a very simple template modification have similar to adsence 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 This code to the bottom of your postbit template.

Here is the code:

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>

Supporters / CoAuthors

Show Your Support

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

Comments
  #12  
Old 12-29-2005, 12:28 PM
ahmed-samara ahmed-samara is offline
 
Join Date: Dec 2004
Location: egypt
Posts: 178
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks man.
Reply With Quote
  #13  
Old 12-29-2005, 01:17 PM
Lapsetur Lapsetur is offline
 
Join Date: Oct 2005
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sometimes it shows sometimes not I couldn't figure out
Reply With Quote
  #14  
Old 12-29-2005, 01:44 PM
wolfstream wolfstream is offline
 
Join Date: Jan 2003
Location: Iowa
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lapsetur
Sometimes it shows sometimes not I couldn't figure out
If it's "randomly" not working, then most likely it's not the code at all, but communication with adsense. This happens occasionally.
Reply With Quote
  #15  
Old 12-29-2005, 01:47 PM
Lapsetur Lapsetur is offline
 
Join Date: Oct 2005
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well the code did not work with postbit but work on postbit_legacy. Why this happens also?
Reply With Quote
  #16  
Old 12-29-2005, 01:50 PM
Lapsetur Lapsetur is offline
 
Join Date: Oct 2005
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I also put an adsense code to header and it work fine but in ipostbit_legacy I am having problem
Reply With Quote
  #17  
Old 10-13-2006, 12:45 AM
nishv nishv is offline
 
Join Date: Jul 2006
Location: London, UK
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Rather than doing that, how about adding a code to show every X post...

The Following will work with vB 3.6.1

Code:
<if condition="$post[postcount] % X == 0">
Replace X with the Number.
Reply With Quote
  #18  
Old 01-15-2007, 05:59 PM
Camz Camz is offline
 
Join Date: Mar 2003
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can i use this hack on posbit?
Reply With Quote
  #19  
Old 02-03-2007, 08:13 AM
mcyates mcyates is offline
 
Join Date: Jan 2003
Location: Middlesbrough, Cleveland
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes, just put it at the bottom of that template and it will work in exactly the same way.
Reply With Quote
  #20  
Old 06-18-2007, 10:42 AM
mcyates mcyates is offline
 
Join Date: Jan 2003
Location: Middlesbrough, Cleveland
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lapsetur View Post
Well the code did not work with postbit but work on postbit_legacy. Why this happens also?
It should work properly. Sometimes if you have google adverts above this code then google stop showing them. Google only allow so many ads on the page, 2 or 3 I think.
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 06:03 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.07708 seconds
  • Memory Usage 2,292KB
  • Queries Executed 27 (?)
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
  • (4)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_postinfo_query
  • fetch_postinfo
  • 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