Nested Quotes

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.

Thanks.
 
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:

library/XenForo/ControllerPublic/Post.php

This is the relevant code:

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:

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

like so:

Code:
		$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.
 
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.
 
quote="The8thLegion, post: 307563, member: 5483"]Thanks!
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.
 
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.
No, not really. Can you post screenshots please?
 
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?
 
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:

library/XenForo/ControllerPublic/Post.php

This is the relevant code:

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:

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

like so:

Code:
        $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.
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?
 
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:

library/XenForo/ControllerPublic/Post.php

This is the relevant code:

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:

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

like so:

Code:
        $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.

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:
Back
Top Bottom