The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
HTML Code:
<vb:if condition="$post['postcount'] % $vboptions['maxposts'] == ?">
|
#3
|
|||
|
|||
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 |
#4
|
||||
|
||||
Try this:
HTML Code:
<vb:if condition="($post['postcount'] % $vboptions['maxposts'] == 5) AND $post['postcount'] > 9">
|
#5
|
|||
|
|||
Hello mokujin,
The above conditional is not working. |
#6
|
|||
|
|||
try this:
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"? |
#7
|
||||
|
||||
Try this one.
HTML Code:
<vb:if condition="post['postcount'] % $vboptions['maxposts'] == 5 AND $GLOBALS[threadinfo][replycount] >= 9">
|
#8
|
||||
|
||||
Quote:
HTML Code:
<vb:if condition="$post[postcount] == X>
|
Благодарность от: | ||
punchbowl |
#10
|
||||
|
||||
Not a problem, glad to help.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|