R rdn Well-known member Feb 16, 2019 #1 On message_macros template. This doesn't work: Code: <xf:if is="$post.position % $xf.options.messagesPerPage == 0"> Or Code: <xf:if is="{$post.position} % {$xf.options.messagesPerPage} == 0">
On message_macros template. This doesn't work: Code: <xf:if is="$post.position % $xf.options.messagesPerPage == 0"> Or Code: <xf:if is="{$post.position} % {$xf.options.messagesPerPage} == 0">
DL6 Well-known member Feb 16, 2019 #2 $post is not available in that template, what are you trying to do? Upvote 0 Downvote
R rdn Well-known member Feb 17, 2019 #3 I want to display the Medals manually under message extra info. But only on first post/thread starter. Thanks @DL6 Upvote 0 Downvote
I want to display the Medals manually under message extra info. But only on first post/thread starter. Thanks @DL6
TickTackk Well-known member Mar 8, 2019 #5 @rdn ACP > Advertising > Add advertisement, select "Post below message content" and set the value of HTML to Code: <xf:if is="$post.Thread && $post.post_id === $post.Thread.first_post_id"> Mozambique here </xf:if> and then apply save. Upvote 0 Downvote
@rdn ACP > Advertising > Add advertisement, select "Post below message content" and set the value of HTML to Code: <xf:if is="$post.Thread && $post.post_id === $post.Thread.first_post_id"> Mozambique here </xf:if> and then apply save.
R rdn Well-known member Mar 9, 2019 #6 Thanks! but I need to use it on message_macros template. Upvote 0 Downvote
TickTackk Well-known member Mar 9, 2019 #7 What's the end result you're trying to achieve? Upvote 0 Downvote
R rdn Well-known member Mar 15, 2019 #8 Sample if I want the signature and message-userExtras to display on 1st post only. I tried your code but doesn't do anything. Upvote 0 Downvote
Sample if I want the signature and message-userExtras to display on 1st post only. I tried your code but doesn't do anything.
Nuno Well-known member Mar 16, 2019 #9 This will do: <xf:if is="{$__globals.thread} AND {$__globals.post} AND {$__globals.thread.first_post_id} == {$__globals.post.post_id}"> Last edited: Mar 16, 2019 Upvote 0 Downvote
This will do: <xf:if is="{$__globals.thread} AND {$__globals.post} AND {$__globals.thread.first_post_id} == {$__globals.post.post_id}">
R rdn Well-known member Mar 17, 2019 #10 Nuno said: This will do: <xf:if is="{$__globals.thread} AND {$__globals.post} AND {$__globals.thread.first_post_id} == {$__globals.post.post_id}"> Click to expand... Thanks! But still doesn't do anything: Upvote 0 Downvote
Nuno said: This will do: <xf:if is="{$__globals.thread} AND {$__globals.post} AND {$__globals.thread.first_post_id} == {$__globals.post.post_id}"> Click to expand... Thanks! But still doesn't do anything:
Nuno Well-known member Mar 17, 2019 #11 Try to add the conditional inside de macro tag Upvote 0 Downvote
TickTackk Well-known member Mar 17, 2019 #12 You have to put those conditions instead of macro tag. Upvote 0 Downvote
R rdn Well-known member Mar 22, 2019 #14 batpool52! said: @rdn ACP > Advertising > Add advertisement, select "Post below message content" and set the value of HTML to Code: <xf:if is="$post.Thread && $post.post_id === $post.Thread.first_post_id"> Mozambique here </xf:if> and then apply save. Click to expand... Nuno said: This will do: <xf:if is="{$__globals.thread} AND {$__globals.post} AND {$__globals.thread.first_post_id} == {$__globals.post.post_id}"> Click to expand... What is the difference of this 2 code by the way? Thanks! Upvote 0 Downvote
batpool52! said: @rdn ACP > Advertising > Add advertisement, select "Post below message content" and set the value of HTML to Code: <xf:if is="$post.Thread && $post.post_id === $post.Thread.first_post_id"> Mozambique here </xf:if> and then apply save. Click to expand... Nuno said: This will do: <xf:if is="{$__globals.thread} AND {$__globals.post} AND {$__globals.thread.first_post_id} == {$__globals.post.post_id}"> Click to expand... What is the difference of this 2 code by the way? Thanks!
R rdn Well-known member Jun 14, 2019 #15 Nuno said: This will do: <xf:if is="{$__globals.thread} AND {$__globals.post} AND {$__globals.thread.first_post_id} == {$__globals.post.post_id}"> Click to expand... What about targeting last post? Thanks a lot Sir! Upvote 0 Downvote
Nuno said: This will do: <xf:if is="{$__globals.thread} AND {$__globals.post} AND {$__globals.thread.first_post_id} == {$__globals.post.post_id}"> Click to expand... What about targeting last post? Thanks a lot Sir!
Nuno Well-known member Jun 14, 2019 #16 This will do it when you have at least 4 posts in the thread. Code: <xf:if is="$post.position == $xf.options.messagesPerPage - 1 OR $post.position % $xf.options.messagesPerPage + 1 == count($__globals.posts) AND count($__globals.posts) >= 4"> Upvote 0 Downvote
This will do it when you have at least 4 posts in the thread. Code: <xf:if is="$post.position == $xf.options.messagesPerPage - 1 OR $post.position % $xf.options.messagesPerPage + 1 == count($__globals.posts) AND count($__globals.posts) >= 4">
TickTackk Well-known member Jun 14, 2019 #17 Or use Nuno said: This will do: <xf:if is="{$__globals.thread} AND {$__globals.post} AND {$__globals.thread.first_post_id} == {$__globals.post.post_id}"> Click to expand... and change first_post_id to last_post_id Upvote 0 Downvote
Or use Nuno said: This will do: <xf:if is="{$__globals.thread} AND {$__globals.post} AND {$__globals.thread.first_post_id} == {$__globals.post.post_id}"> Click to expand... and change first_post_id to last_post_id
R rdn Well-known member Jun 14, 2019 #18 batpool52! said: Or use and change first_post_id to last_post_id Click to expand... I already tried this, doesn't work. Thanks! Upvote 0 Downvote
batpool52! said: Or use and change first_post_id to last_post_id Click to expand... I already tried this, doesn't work. Thanks!
TickTackk Well-known member Jun 15, 2019 #19 rdn said: I already tried this, doesn't work. Thanks! Click to expand... What was the result? Upvote 0 Downvote
Murat Cabuks Member Dec 13, 2019 #20 How to assign noindex to a specific category and all topics in that category? Upvote 0 Downvote