Simple:Press Documentation

FAQ: Understanding Unread Post Lists

Understanding the Unread Post List

The unread post list is a personalised compilation of all topics that have received new posts since the users last forum visit – or last forum page load. This list can only be maintained for registered users if the forum. This FAQ explains how it is compiled and maintained.

When a member logs in to the forum the following actions take place:

  • The ‘last visited’ timestamp is retrieved from their user record.
  • Topics are scanned for any posts that have been made to them since that timestamp.
  • A ‘new-posts’ array is created in their user record of these topic ids.
  • At the same time a separate ‘new-posts-time’ timestamp is recorded noting the time the topics were scanned.
  • The page (or template tag etc) is displayed and any topics being included in the display that are in the users ‘new-posts’ list are marked accordingly.

When the member selects to view a topic (and that means the posts of a topic), the following actions are triggered:

  • The members ‘new-posts’ list is checked to determine if the one being selected to view is in the list. If it is then it is removed from the members ‘new-posts’ list.
  • The previous ‘new-posts-time’ timestamp is retrieved.
  • Topics are scanned for any posts that have been made to them since that timestamp.
  • A ‘new-posts’ array is updated if anything new is found (i.e., added by a different user also on-line).
  • The ‘new-posts-time’ timestamp is updated.
  • The page displays as before.

This process continues with every new page loaded by the member.

There are two ways for the member to ‘leave’ the forum. They can physically log out – or they can be assumed to be gone by the time-out feature. This is set at a default of 20 minutes (minimum) of no activity by the member. When the member either logs out or is deemed to have left the site, the following actions take place:

  • The ‘last visited’ timestamp is updated in their user record.
  • They are removed from the sftrack table as no longer on-line.

You will note if you follow the above paths, that when a member is deemed to be no longer active we attempt to save their ‘new-posts’ list and then regenerate them on their next visit.

Note also that the members ‘new post’ view will contain the number of entries specified in the forum options. Therefore the list can contain topics that the member HAS already read but are still classed as ‘recent’ and will not display the ‘unread’ icon. Conversely, if the members new-post list is longer than the display setting, not ALL unread posts will be shown in the list but will appear as the member views the marked new posts.

More Topics In FAQ


Copyright © 2006-2019 Simple:Press. All Rights Reserved.