• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Another conditional question

I've placed the conditional code below in "message" template to show an Ad on the last line of the first post.

<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id} AND !{$visitor.user_id} AND {$thread.reply_count} > 0">

The conditional only shows an Ad on the first post.
How can I modify the conditional so that the Ad shows on the first, second and third post? (Google only allows 3 AdSense unit per page)



XenForo moderator
Staff member
Personally I would use three separate code blocks, changing the post id for each one, to allow for tracking.