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

XF 1.3 Ad in the first and last post on each page

Discussion in 'XenForo Questions and Support' started by dojo, Mar 25, 2014.

  1. dojo

    dojo Active Member

    Another question from me :)

    I need to show ads in the first and last post. The first post worked with this conditional:
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">

    The ads show in the first post on each page of the thread.

    Was able to do something 'weird' and show it for the last one (if it's a 'full' page - 20 posts) with this one:
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">

    It's not quite orthodox, but it did the job.
    On the pages where there are less than 20 messages, the second ad doesn't show.

    So .. what I need to accomplish:
    Show the ad on EACH page in the first and last post (if there's just one post, I need to show only one banner).
    Is there a conditional that would allow me to do this?
    Thank you.
    wickedstangs and jauburn like this.
  2. konakid

    konakid Member

    I would also be curious as to how to accomplish this.
  3. jauburn

    jauburn Well-Known Member

    Me, too.

Share This Page