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

XF 1.4 Adsense within first and last post

Discussion in 'XenForo Questions and Support' started by Majora, Jun 26, 2015.

  1. Majora

    Majora Member

  2. Brogan

    Brogan XenForo Moderator Staff Member

    See the links in my signature for guides on conditional statements and adsense.
     
  3. sndrsndv

    sndrsndv Member

    Hi Brogan,

    Do you have any conditional statements to show adsense after the last post. Your codes work great for Showing ads after First Post and "so many posts but none for "last post"
     
  4. Tracy Perry

    Tracy Perry Well-Known Member

    #18 in his guide?
    Code:
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == x">
    This content will show after post x on every page
    </xen:if>
    
     
  5. sndrsndv

    sndrsndv Member

    How will this add adsense after the last reply? that code will only display adds on a specific number of replies i choose hence the" == x ". Number of replies can change per thread
     
  6. Tracy Perry

    Tracy Perry Well-Known Member

    Are you talking about on each page? Or the very last in the topic?
    What that will do is display after 23'rd on each page. As for the "last" actual post in the thread - good question?
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    For the last post you can use {$post.position} == {$thread.reply_count}.
     
    Tracy Perry likes this.

Share This Page