Number of Unread Posts

nrep

Well-known member
Would it be easy enough to make a mod that shows the number of unread posts since the last visit? I'm trying to add this number in to the header template, but I can't find an existing mod or variable.

If anyone can point me in the right direction that would be a big help!
 
PHP:
/**
	 * Gets the IDs of threads that the specified user has not read. Doesn't not work for guests.
	 * Doesn't include deleted.
	 *
	 * @param integer $userId
	 * @param array $fetchOptions Fetching options; limit only
	 *
	 * @return array List of thread IDs
	 */
	public function getUnreadThreadIds($userId, array $fetchOptions = array())

XenForo_Model_Thread, line 450. You should be able to run that and return the results using the $viewParams inside your extended ControllerPublic.
 
Top Bottom