Quote:
Originally Posted by BirdOPrey5
There's no condition specifically for 2nd posts but if you set your forum to a set number of posts per page you could make a condition like:
Code:
<vb:if condition="$post[postcount] == 2 OR $post[postcount] == 12 OR$post[postcount] == 22 OR $post[postcount] == 32 OR $post[postcount] == 42 OR $post[postcount] == 52 OR $post[postcount] == 62">
</vb:if>
...and so on... Assuming 10 posts per page- Yeah at some point the condition won't work anymore but how many threads really go X number of pages anyway. I assume you want it to show an ad so if it works in 95% of thread pages it should be good enough.
|
An approach I have tested out but collided with other ads around the last post on a thread, if the showthread page contains only two or three postings. To overwhelming and filled with ads.
I try to modify and create the ad-placements with a precheck, wether there are more then X posts on a showthread page or not. Dependencies:
- if the visitor is a guest
- if the ad placement is the X post on this showthread page as seen in the browser
- if the page (not the whole thread) shows at least Y postings (to avoid that the whole page is looking like an adfarm)
PHP Code:
<vb:if condition="$show['guest']">
<vb:if condition="$post['postcount'] % $vboptions['maxposts'] == X">
[CONTENT HERE]
</vb:if>
</vb:if>
That?s how it looks like so far - but I can?t find anything that could help me with the last if statement. Does anyone has an idea how this could be done? Isn?t there something in vB that can be used for that? May be I?m just to blind but that damn thing ruined my whole day yesterday. I would be glad someone could lead a blind and help me out of this mess..
Any help appreciated.