1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.
    Dismiss Notice
  3. 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

Discussion in 'Code Modifications [Archive]' started by Jake Bunce, May 31, 2011.

  1. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    (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:


    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.
    Sylar, @lex, EQnoble and 1 other person like this.
  2. Sylar

    Sylar Well-Known Member

    Dude, I love you. Thank you so much!

Share This Page