does "Recent Activity" has a time set until it disappears in user-profile?

erich37

Well-known member
I am checking a few of my users and I do see their posts at other user-profiel-pages.

But when I go to the user's page, those posts are not visible anymore at their "Recent Activity" tab.

It sems there is a certain time being set, as to when "Recent Activities" are disapperaing at the user-profile?
If so, is there a chance to not have those disappear?

Many thanks!
 
It is hard-coded at 7 days:

library/XenForo/Model/NewsFeed.php

Rich (BB code):
	public function deleteOldNewsFeedItems($dateCut = null)
	{
		if ($dateCut === null)
		{
			$expiryTime = 7 * 86400; // TODO: hard coded to 7 days
			$dateCut = XenForo_Application::$time - $expiryTime;
		}

		$db = $this->_getDb();
		$db->delete('xf_news_feed', 'event_date < '. $db->quote($dateCut));
	}

This function prunes old feed items and is run every hour as part of this cron:

Admin CP -> Tools -> Cron Entries -> Hourly Clean Up

If you modify this code with a file edit or addon then it will not automatically restore old feed items. But current and future items will last longer up to the new expiry that you specify.
 
It is hard-coded at 7 days:

library/XenForo/Model/NewsFeed.php

Rich (BB code):
public function deleteOldNewsFeedItems($dateCut = null)
{
if ($dateCut === null)
{
$expiryTime = 7 * 86400; // TODO: hard coded to 7 days
$dateCut = XenForo_Application::$time - $expiryTime;
}
 
$db = $this->_getDb();
$db->delete('xf_news_feed', 'event_date < '. $db->quote($dateCut));
}

Just to clarify. When editing the code in red above...
The following code will make it 14 days then?

Code:
$expiryTime = 14 * 172800; // TODO: hard coded to 14 days
 
Top Bottom