1. 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

Discussion in 'XenForo Questions and Support' started by RaymondCC, Sep 6, 2013.

  1. RaymondCC

    RaymondCC Member

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

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

    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)

    Thanks.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Personally I would use three separate code blocks, changing the post id for each one, to allow for tracking.
     
  3. RaymondCC

    RaymondCC Member

    Wouldn't that somehow slow down the processing of the page?
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

Share This Page