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

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

Discussion in 'XenForo Questions and Support' started by erich37, Aug 8, 2011.

  1. erich37

    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!
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It is hard-coded at 7 days:


    	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.
    CarlosMST, Eagle, MsJacquiiC and 2 others like this.
  3. MsJacquiiC

    MsJacquiiC Well-Known Member

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

    $expiryTime = 14 * 172800; // TODO: hard coded to 14 days
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Only change the number of days (7 to 14). You don't need to change the multiplied value (which is the number of seconds in one day).

    $expiryTime = 14 * 86400; // TODO: hard coded to 14 days
    Eagle and MsJacquiiC like this.
  5. MsJacquiiC

    MsJacquiiC Well-Known Member

    Ah okay. Thanks Jake!(y)

Share This Page