The vB Geek

Go Back   The vB Geek > vB Geek Modifications > Tutorials

Tutorials Tutorials and articles on using vB Geek stuff.

Advertisement
  Learn how to remove ads

Comment
 
Tutorial Tools Display Modes
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 

  #1  
By dsurban on 02-09-2008, 08:27 AM
Default

where do I fhind this?

"Add a plugin to the postbit_display_complete hook with the following code:"

thanks
Reply With Quote
  #2  
By Morgan on 02-09-2008, 08:29 AM
Default

Reply With Quote
  #3  
By dsurban on 02-09-2008, 02:43 PM
Default

cheers, got it working now
Reply With Quote
  #4  
By KenDude on 02-10-2008, 05:11 AM
Default

Quote:
Originally Posted by Morgan View Post

This link is not working for me...
Reply With Quote
  #5  
By Morgan on 02-11-2008, 04:34 PM
Default

Reply With Quote
  #6  
By mushrom on 03-12-2008, 03:01 PM
Default

with this tutorial can we make that ads appear ONLY after the 1st post and not every X posts?
Reply With Quote
  #7  
By Morgan on 03-12-2008, 04:58 PM
Default

Reply With Quote
  #8  
By ichatfilipina on 03-10-2009, 09:45 AM
Default

<if condition="$post[postcount] % X == 0">
<div style="padding-top:5px">
$GAB_ads[$GAB_random_key]
</div>
</if>

--
<if condition="$post[postcount] % X == 0"> is this really capital X? or small case?
Reply With Quote
  #9  
By Morgan on 03-11-2009, 10:12 PM
Default

The account you used to post your message is showing as unlicensed. Please use the account with a license to obtain support. Thank you.
Reply With Quote
Comment

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 02:27 PM.


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

Tutorial powered by GARS 2.1.9 ©2005-2006