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

XF 1.3 Is it posible to do?

Discussion in 'Styling and Customization Questions' started by jmmp, Aug 5, 2014.

  1. jmmp

    jmmp Member

    Hi, (sorry, i dont speak english)

    I would like to do this modification in xf 1.3:

    Add "Latest Threads" To Navbar


    I'd like to see the last threads created, not last posts, but not works this url's type to show last (or recent) threads:


    @Jake Bunce have a comment about urls with parameters for all of this:


    Does anyone know how to do it?

    (My apologies because my english level is... :cry:)
    Last edited: Aug 6, 2014
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    If you want that link then use this in the navigation template:

    					<li><a href="{xen:link 'find-new/threads', '', 'recent=1'}">Recent Threads</a></li>
  3. jmmp

    jmmp Member

    No, Jake, this link not show recent threads, it show recent posts. Please, test it.
  4. jmmp

    jmmp Member

    @Jake Bunce ,

    Is there any way to do a url with parameters to get "recent threads"? (XF 1.3)
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It sorts by last post date. Changing this to thread post date requires a code modification:


    Remove the red code:

    	public function findNewPosts()
    		$threadModel = $this->_getThreadModel();
    		$searchModel = $this->_getSearchModel();
    		$userId = XenForo_Visitor::getUserId();
    		$visitor = XenForo_Visitor::getInstance();
    		$limitOptions = array(
    			'limit' => XenForo_Application::get('options')->maximumSearchResults
    		$days = $this->_input->filterSingle('days', XenForo_Input::UINT);
    		$recent = $this->_input->filterSingle('recent', XenForo_Input::UINT);
    		$watched = $this->_input->filterSingle('watched', XenForo_Input::UINT);
    		if ($userId && !$days && !$recent)
    			$threadIds = $threadModel->getUnreadThreadIds($userId, $limitOptions, $watched);
    			$searchType = 'new-posts';
    			if ($days < 1)
    				$days = max(7, XenForo_Application::get('options')->readMarkingDataLifetime);
    			$fetchOptions = $limitOptions + array(
    				'order' => 'last_post_date',
    				'orderDirection' => 'desc',
    				'watchUserId' => $userId,
    				'forumWatchUserId' => $userId,
    				'join' => XenForo_Model_Thread::FETCH_FORUM_OPTIONS
  6. jmmp

    jmmp Member


    But... i don't want to lose "recent posts" link option. I'd like to have both links (recent posts and recent threads).

    Is it posible, Jake?

Share This Page