The vB Geek

Go Back   The vB Geek > vB Geek Modifications > Tutorials

Tutorials Tutorials and articles on using vB Geek stuff.

Advertisement
This is an HTML example. Isn't it just wonderful?!?!
  Learn how to remove ads

 
 
Tutorial Tools Display Modes
Prev Previous Post   Next Post Next
Ad after every X posts
Ad after every X posts
Published by Morgan
02-05-2008
Default Ad after every X posts

Add a plugin to the postbit_display_complete hook with the following code:
Code:
global $GAB_ads;
Add the following to the end of the postbit template, changing X to the number of posts before an
ad appears and changing Y to 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9 depending on what you have set in GAB :
Code:
<if condition="$post[postcount] % X == 0">
	<div style="padding-top:5px">
		$GAB_ads[Y]
	</div>
</if>
If you want the ad to be random, not the same ad every single time, do the following instead.

Add a plugin to the postbit_display_complete hook with the following code:
Code:
global $GAB_ads;
$GAB_random_key = 0;
if (is_array($GAB_ads))
{
	$GAB_random_key = array_rand($GAB_ads);
}
Add the following to the end of the postbit template, changing X to the number of posts before an
ad appears:
Code:
<if condition="$post[postcount] % X == 0">
	<div style="padding-top:5px">
		$GAB_ads[$GAB_random_key]
	</div>
</if>
Note that the latter method assumes you have set at least two $GAB_ads[X] variables in scripts.
Tutorial for
GAB

Tutorial Tools
Show Printable Version  Email this Page 

 

Tutorial Tools
Display Modes

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

Similar Threads
Tutorial Tutorial Starter Category Comments Last Post
Linking old posts abrecher Geek Auto-Linker 1 06-10-2009 03:27 PM
Adsense after X posts? mushrom Geek Advertising Banner System 2 03-26-2008 03:31 PM
banner after posts dsurban Geek Advertising Banner System 1 02-07-2008 06:07 PM
Banners Between Posts? thetraveler Geek Advertising Banner System 18 09-03-2007 07:33 AM
No posts in this category? tamborinegal Geek Article and Review System 10 02-21-2007 01:34 AM


All times are GMT. The time now is 03:36 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

Tutorial powered by GARS 2.1.9 ©2005-2006