Is it possible to limit to the new threads the global RSS feed?


Well-known member
I use the feed for Google, Twitter, Facebook and Google+ pages, but the global feed include all the "discussed" threads and not the new threads only.

Is it possible to limit to the new threads the global RSS feed?

Jake Bunce

XenForo moderator
Staff member
I think you want this:


Remove the red code:

Rich (BB code):
	public function getGlobalForumRss()
		$threadModel = $this->_getThreadModel();
		$visitor = XenForo_Visitor::getInstance();

		$threadsPerPage = max(1, XenForo_Application::get('options')->discussionsPerPage);
		$autoReadDate = XenForo_Application::$time - (XenForo_Application::get('options')->readMarkingDataLifetime * 86400);

		$threads = $threadModel->getThreads(
			array('find_new' => true, 'last_post_date' => array('>', $autoReadDate)),
				'limit' => $threadsPerPage * 3, // to filter
				'order' => 'last_post_date',
				'join' =>
					XenForo_Model_Thread::FETCH_FORUM | XenForo_Model_Thread::FETCH_FORUM_OPTIONS |
				'permissionCombinationId' => $visitor['permission_combination_id']
		foreach ($threads AS $key => $thread)
			$thread['permissions'] = XenForo_Permission::unserializePermissions($thread['node_permission_cache']);

			if (!$threadModel->canViewThreadAndContainer($thread, $thread, $null, $thread['permissions']))
		$threads = array_slice($threads, 0, $threadsPerPage, true);

		$viewParams = array(
			'threads' => $threads
		return $this->responseView('XenForo_ViewPublic_Forum_GlobalRss', '', $viewParams);
Now the global feed will order threads by thread start date, not last post date.


Well-known member
Thank you Jacke, as always you know the answer! :love:
I'll test this and report back for future readers (y)


Well-known member
One more thing Jake. Do I need to run a cron or something else for refresh the RSS Feed cache (if exists)?
Thank you


@giorgino did you figure this out? I have made the edit above, but it did not make a difference. This post was from 2012 so things might have changed as well. Any idea @Jake Bunce ?

[edit My mistake... forgot I had cache on my server . After refresh works!]


Active member
Weird question with Xenforo 1.5 is there a way to get it so it DOES what it used to do with the posts in global RSS reposting every time there is a new reply?