• 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?

#1
Hi, (sorry, i dont speak english)

I would like to do this modification in xf 1.3:

Add "Latest Threads" To Navbar

http://xenforo.com/community/threads/add-latest-threads-to-navbar.8502/

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:

http://xenforo.com/community/find-new/threads?recent=1

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

http://xenforo.com/community/threads/pull-latest-threads.30007/#post-364198

Does anyone know how to do it?

(My apologies because my english level is... :cry:)
 
Last edited:

Jake Bunce

XenForo moderator
Staff member
#2
If you want that link then use this in the navigation template:

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

Jake Bunce

XenForo moderator
Staff member
#5
It sorts by last post date. Changing this to thread post date requires a code modification:

library/XenForo/ControllerPublic/FindNew.php

Remove the red code:

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';
		}
		else
		{
			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
Yes!!

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?