R rdn Well-known member Nov 17, 2017 #1 I have a Code shown on every 4th thread post. Now I would like to add a condition. I would like to prevent it from showing when it's the Last Post of the thread. How can I do that? Many Thanks!
I have a Code shown on every 4th thread post. Now I would like to add a condition. I would like to prevent it from showing when it's the Last Post of the thread. How can I do that? Many Thanks!
Siropu Well-known member Nov 17, 2017 #2 Try: {$post.post_id} != {$thread.last_post_id} Upvote 0 Downvote
R rdn Well-known member Nov 17, 2017 #3 I tried: PHP: !in_array({$forum.node_id}, array( 1,2,3,4 )) AND {$visitorIsBrowsingWithMobile} AND !{$thread.last_post_id} and PHP: !in_array({$forum.node_id}, array( 1,2,3,4 )) AND {$visitorIsBrowsingWithMobile} AND {$post.post_id} != {$thread.last_post_id} Both doesn't show the widget. Upvote 0 Downvote
I tried: PHP: !in_array({$forum.node_id}, array( 1,2,3,4 )) AND {$visitorIsBrowsingWithMobile} AND !{$thread.last_post_id} and PHP: !in_array({$forum.node_id}, array( 1,2,3,4 )) AND {$visitorIsBrowsingWithMobile} AND {$post.post_id} != {$thread.last_post_id} Both doesn't show the widget.
R rdn Well-known member Nov 17, 2017 #4 Maybe that variable isn't available on message template? Upvote 0 Downvote
R rdn Well-known member Nov 17, 2017 #5 Mike said: If I understand, this is what you want: $post.Thread.last_post_id == $post.post_id Click to expand... Can I translate this into xf conditional @Mike? Upvote 0 Downvote
Mike said: If I understand, this is what you want: $post.Thread.last_post_id == $post.post_id Click to expand... Can I translate this into xf conditional @Mike?
R rdn Well-known member Nov 17, 2017 #6 Solved now with this code added: Code: count({$posts}) > 4 Last edited: Nov 17, 2017 Upvote 0 Downvote