balexandre
Junior Member
Denmark
418 Posts |
Posted - 05 September 2009 : 21:19:20
|
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 |
|
|