PDA

View Full Version : Ad after every sixth post


kodbg
09-16-2012, 10:01 AM
Hello
I want to put an ad after every 6 post, to be shown only if the split page has 9 posts.
This code:
<vb:if condition="$post[postcount] % $vboptions[maxposts] == 6 AND $GLOBALS[threadinfo][replycount] > 8">

works OK, but only for first page.
If i split my pages on every 20 posts and the thread has 27 posts, the ad will be shown on second page. But on second split page are only 7 posts - i don't want to show it.


Please, help with code.

Scanu
09-16-2012, 12:10 PM
Maybe this one works

<vb:if condition="$post[postcount] % $vboptions[maxposts] == 6 AND $post[postcount] > 9">

kodbg
09-16-2012, 12:27 PM
:( No... Same thing

Scanu
09-16-2012, 01:35 PM
Basically the problem is that $post[postcount] indicates the post count of the thread (not of the page)
You could solve this problem just when you try to show something after first post of each page (condition would be $post['isfirstshow'] ) but i don't know a way to do what you want on each page without using a plugin :/

kodbg
09-16-2012, 02:08 PM
mm, maybe advise about plugin?
I'm ex SMF and new in VB :)

Scanu
09-16-2012, 02:59 PM
Will try something as soon as i can

kodbg
09-16-2012, 05:30 PM
OK, thank you very much.