Home  ›  FAQ Answers  ›  Understand Unread Post Lists

Understand Unread Post Lists

The new and unread posts lists have different meanings based on the user type and are detailed below.

Members View

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 15 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, their ‘new-posts’ list will be regenerated at their next login from the time of their last visit. Any topics with unread posts that they did NOT review on their previous session will no longer be marked as ‘unread’.

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.

Admins View

The basic processing of the Admins view is the same as for members but with an extra step. When new posts are made, the topic id is placed in the sfwaiting table. Note that if the topic id is already in the sfwaiting table then the post count is added to against that topic.

This table is a ‘queue’ of new posts that the Admin has not yet reviewed and may, if being used, contain posts that require approval.

The difference to members processing is that the Admins ‘new-post’ list is created by first including the sfwaiting table. Only if the entry count in the sfwaiting table is lower than the display setting for the Quicklinks view does the list go on to contain topics already seen.

In this way, when the Admin logs out or is deemed to be inactive, he does NOT lose new and unread posts from his list because the sfwaiting table will only have entries removed when either:

  1. the Admin views the topic or
  2. the Admin uses the ‘remove’ button shown above the standard new posts view.

In the QuickLinks list, topics that appear in the sfwaiting table are displayed in red. If, however, the topic post(s) require approval (moderation), then the topic is displayed in blue. Both red and blue entries also have bullets beside them.

While a moderator may be granted permission to review new posts from the admin queue (sfwaiting) and also to approve posts requiring moderation, the Admin has the option to disallow those topics being removed from the queue – usually because he wants to make sure he also gets to see them himself.

Article written by steve on January 24, 2010 and last modified by steve on February 26, 2010