Quote:
Originally Posted by Diablotic
I am looking for a condtional that will show an ad only if there is "x" posts on the page.
At the moment I am using:
Code:
<vb:if condition="$GLOBALS[threadinfo][replycount] >= x">AD</vb:if>
to display this ad only if there is minimum "x" posts posted in the thread but I would like to extend it to display it on only if there are "x" posts displayed on the page.
Anyone?
|
I've answered this before... see if this info helps

.
[QUOTE=TheLastSuperman]
Quote:
Originally Posted by karlm
Good stuffs, Clark. Can it be set so as you can choose which post # the ads go to? i.e. atm, they're forced after post #1... but What if I wanted it to be on post #9 instead?
|
Quote:
Originally Posted by TheLastSuperman
Hmm you should be able to, open the template postbit_legacy_ads_after_firstpost and find:
Code:
<vb:if condition="!$GLOBALS['FIRSTPOSTID']">
Replace with:
Code:
<vb:if condition="$post['postcount'] % $vboptions['maxposts'] == ?">
Replace the ? mark with the post number you want the Ads to show after and DO NOT include a trailing </vb:if> as it's already near the bottom  .
Let me know if that works  .
|
Quote:
Originally Posted by karlm
Oooooor, I might want it so it's always the 'last but one' post..?
|
Quote:
Originally Posted by TheLastSuperman
Well that depends on your post per page settings:
AdminCP > settings > Options > Thread Display Options (showthread) > Maximum Displayed Posts Before Page Split
So if you have that set to 20 posts per page before the split simply use the code I just posted above and change the ? mark to 19  .
Example:
Code:
<vb:if condition="$post['postcount'] % $vboptions['maxposts'] == 19">
|
So naturally ignore my references of opening that modifications template and simply note the code being used

.