Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 How to put ad spots between posts ??
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

balexandre
Junior Member

Denmark
418 Posts

Posted - 05 September 2009 :  21:19:20  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
easy, instead of

if ( iForum mod 2 = 0 ) ... witch says: every time 2nd time use:

if ( iForum mod cInt( (iReplyCount + 1) / (ads2show + 1) ) = 0 ) ...

witch will say something like:

divide the number of posts by the ads to show plus 1, plus 1 so we put the ad in the middle and not at the end.

remember to add, if using the variable,

dim ads2show in the config.asp file

work:

4 replies to a post, and we want to add 2 ads:

5 / 3 = 1.666 (cInt will convert to 2 - so, every 2)

1 - post
2 - 1st reply
------------------ AD
3 - 2nd reply
4 - 3rd reply
------------------ AD
5 - 4th reply



Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 05 September 2009 21:22:22
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07