• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Fully nested quotes in the editor

Jake Bunce

XenForo moderator
Staff member
#1
(per 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.