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

Remove to extra posts on reply

Discussion in 'Styling and Customization Questions' started by DBA, Jan 10, 2012.

  1. DBA

    DBA Well-Known Member

    When you're not on the last page of a thread and you reply to a post, it'll show the "view more" bar, the last two post before yours, and also your post. Members on my site find the extra two posts (Red circles) confusing, where do I have to look to not have it do this? Basically all I want is for it to show the post you just added, and the "View more" bar.

    posts.png
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Two options:

    1) Make an addon to extend this function:

    XenForo_ControllerPublic_Thread::actionAddReply

    Or...

    2) Edit this template:

    Admin CP -> Appearance -> Templates -> thread_reply_new_posts

    Replace the contents of this template with this code:

    Code:
    <xen:if is="{$firstUnshownPost}">
    	<li class="newMessagesNotice">{xen:phrase there_more_posts_to_display} <a href="{xen:link posts, $firstUnshownPost}#post-{$firstUnshownPost.post_id}">{xen:phrase view_them}</a></li>
    </xen:if>
    
    <xen:foreach loop="$posts" value="$post" i="$i" count="$count">
    	<xen:if is="{$i} == {$count}">
    		<xen:include template="post" />
    	</xen:if>
    </xen:foreach>
    
    The foreach loop has been changed to display only the new post.
     
    Mr. Goodie2Shoes and DBA like this.
  3. DBA

    DBA Well-Known Member

    It worked!

    Thanks Jake!
     

Share This Page