![]() |
Template Conditional for Ad slot after 5th Post in Postbit
Hello,
Am looking to display ads in showthread page in the below positions - 1)After First Post 2)After 5th Post ONLY IF the thread has 10 posts. For #1, Have used the template conditional in postbit- <vb:if condition="THIS_SCRIPT == showthread AND !$GLOBALS['FIRSTPOSTID']"> Similarly for #2, can anyone help me with the template conditional. Thanks. |
HTML Code:
<vb:if condition="$post['postcount'] % $vboptions['maxposts'] == ?"> |
Yes Thanks, that worked good.
--------------- Added [DATE]1410341902[/DATE] at [TIME]1410341902[/TIME] --------------- Hello ozzy47, Looks like the conditional Code:
<vb:if condition="$post['postcount'] % $vboptions['maxposts'] == 5"> But what am looking for is the below - - Display ad after 5th post ONLY if the thread page has 10 posts. - Do not display Ad if the thread page has 5 or 6 or 7 or 8 or 9 posts in it. Let me know how this conditional could be tweaked. For info, I have the below setting in my forum - Maximum Displayed Posts Before Page Split - 10 |
Try this: :D
HTML Code:
<vb:if condition="($post['postcount'] % $vboptions['maxposts'] == 5) AND $post['postcount'] > 9"> |
Hello mokujin,
The above conditional is not working. |
Quote:
Quote:
is maxposts about the page or about the thread btw? i.e. say I have 10 posts per page and 11 posts in total is postcount 1 or 11?, what is the conditional for basically saying "if there is only x posts on this page"? |
Quote:
HTML Code:
<vb:if condition="post['postcount'] % $vboptions['maxposts'] == 5 AND $GLOBALS[threadinfo][replycount] >= 9"> |
Quote:
HTML Code:
<vb:if condition="$post[postcount] == X> |
Quote:
|
Not a problem, glad to help. :)
|
All times are GMT. The time now is 09:25 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|