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

Nested Quotes

Discussion in 'XenForo Questions and Support' started by CoreIssue, May 7, 2011.

  1. CoreIssue

    CoreIssue Member

    I realize for most multi-quote is more desirable than nested and nested are disliked.

    My site is the opposite. We hardly ever use multi-quote but we do have long posts with a lot of detail within each where nested quotes keep the conversation flowing and making sense.

    So, is there a way I can set nested quotes to at least 3 deep?

    I really need it. On vB I had the Nested Quotes. I don't care if mutli-quote works right or not.

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    XenForo supports nested quotes, but the reply form only quotes one-level deep. That's not to say you can't manually nest the quotes. It will work.

    If you want the editor to automatically do fully nested quotes then you need to modify the code:


    This is the relevant code:

    	 * Displays a form to add a reply to a thread.
    	 * @return XenForo_ControllerResponse_Abstract
    	public function actionQuote()
    		$postId = $this->_input->filterSingle('post_id', XenForo_Input::UINT);
    		$ftpHelper = $this->getHelper('ForumThreadPost');
    		list($post, $thread, $forum) = $ftpHelper->assertPostValidAndViewable($postId,  array(
    			'join' => XenForo_Model_Post::FETCH_USER
    		$quote = $this->_getPostModel()->getQuoteTextForPost($post);
    		$viewParams = array(
    			'thread' => $thread,
    			'forum' => $forum,
    			'post' => $post,
    			'quote' => $quote
    		return $this->responseView('XenForo_ViewPublic_Post_Quote', 'post_quote', $viewParams);
    You would need to modify this line:

    		$quote = $this->_getPostModel()->getQuoteTextForPost($post);
    like so:

    		$quote = $this->_getPostModel()->getQuoteTextForPost($post, -1);
    Directly editing the files isn't ideal. You should use an addon. If you are a programmer then you can post in the Development Questions forum for help with this. Or post an Add-on Request and some one may be able to write this for you.
    silverSl!DE, Digital Doctor and Mike like this.
  3. CoreIssue

    CoreIssue Member

    An Admin option would be the ideal since I know I am not alone with an Addon the second best. But, alas, I am not a programmer but will ask for an Addon. In the mean time I will do the code modification then undo it if a Addon is created later. Thanks so much. I will be doing this shortly.
  4. DRE

    DRE Well-Known Member

    What does a nested quote look like?
  5. Andrej

    Andrej Well-Known Member

  6. DRE

    DRE Well-Known Member

  7. CoreIssue

    CoreIssue Member

    This is an example of what happens with only one level. The quote you gave and are thanking is removed.

    The value of nested, for some issues, is when several people are posting but you have one particular stream of conversation within it and need to keep it together for flow. You cannot do it with the default XF.

    On phpbb it looks like this.

    SMF post 8 is an example of 3 levels.

    On my site, having done what was said above, here basically what a chain looks like:

    CoreIssue said:
    Initial post​
    --- merged: A moment ago ---

    Reply 1​
    --- merged: A moment ago ---

    Reply 2​
    Reply 3

    You see some posting examples of a dozen or more Nested Posts to say do not allow. In years of using them rarely has that been a problem. Not to mention there should be an Admin Panel control to set a depth limit that meets the needs of each forum.

    So, everyone can be happy if Admins are given the ability to choose setting for their own needs. Because some do not like them does not mean no one should be able to use them.

    I hope that helps give a clearer picture.
  8. DRE

    DRE Well-Known Member

    No, not really. Can you post screenshots please?
  9. CoreIssue

    CoreIssue Member

    SMF post 8

    For my XF site, see attached.

    Attached Files:

  10. DRE

    DRE Well-Known Member

    I prefer the SMF post quotes over the phpbb quotes and that's probably because quotes inside had different color backgrounds. It's easier to follow that way. Can we do this with xenforo?
    Digital Doctor likes this.
  11. CoreIssue

    CoreIssue Member

    It would require being rewritten into the base/core code by the developers or as an Add-on. Either way requires more skill than I possess.
  12. Akela

    Akela Active Member

    There isn't an addon for this at this point, is there?
  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Not a configurable option, no.
    Akela likes this.
  14. Mr Lucky

    Mr Lucky Well-Known Member

    But is there an unconfigurable one?
  15. Big_Dog

    Big_Dog Member

    I made the above change, and it appears to have made no impact. Nested quotes still have to be done by hand. Is it because XF code has changed since this post?
  16. CoreIssue

    CoreIssue Member

    ScarletCox likes this.
  17. Big_Dog

    Big_Dog Member

  18. Mr Lucky

    Mr Lucky Well-Known Member

    Last edited: Jun 20, 2015
  19. Mr Lucky

    Mr Lucky Well-Known Member

    This works nicely, but how would you limit the depth of the nesting, e.g. to only allow one quote within a quote or whatever number you choose?

    EDIT: got it, just change -1 to 1,2,3, or whatever.

    So I presume -1 is infinity nestings, is that right?
    Last edited: Jun 20, 2015
  20. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member


Share This Page