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

XF 1.2 Advertisements for guests under first posts on a page?

Discussion in 'Styling and Customization Questions' started by Izagar, Aug 3, 2013.

  1. Izagar

    Izagar Active Member

    I hope the title is easy to explain. >_<

    I'd like to have advertisements under the first post of each topic... Maybe possible under the first post of each page... Or maybe the middle post on each page? I don't know.

    I searched for it before on Google and found a post that Brogan made, but now I can't find it.

    Code:
    <xen:if is="!{$visitor.user_id}">
    This content will show to guests
    </xen:if>
    You got that code, so how do I modify it to make an ad work under a certain post for guests only?

    I would appreciate the help. :)
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    I use this:
    Code:
    <xen:if is="!{$visitor.user_id}">
        <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND {$thread.reply_count} > 0">
    You could combine the two xen:if statements but I have left them separate in case I ever want to easily change the visitor criteria.
     
    Sebastian Querelos and Izagar like this.
  3. Brogan

    Brogan XenForo Moderator Staff Member

    Izagar likes this.

Share This Page