Welcome to the Browser-Base Game Zone forums!
When a user creates an account, you create an array containing the id for each top-level posting. (It may help to have this array pre-built whenever a new topic is added and stored somewhere so it can just be selected and unserialized so you're only selecting 1 row not many thousands).The array would store a value of true with a key matching the id of the top-level post.Whenever a user visits a post, simply do:unset ($unread [$top-levelId]);When the user logs out (or is logged out by some method you perform: ie, cron), you serialize that array and datestamp it.The next time the user logs in, that serialized array is called and unserialized and then you select only top-level postids for dates AFTER the date stamp on the array. Add those dates to the user's array and you've got a perpetual system.When a user specifies 'mark a post as read' it's as easy as calling the same unset ($unread [$postId]).
Users could than choose to not have new post from it show up in their unread message section.
.thread:link:before { content: url(./pcs/icon-unread.gif); /* ... */ }.thread:visited:before { content: url(./pcs/icon-read.gif); /* ... */ }
@Cygnus this way if you read first one then all below would be marked as read...
1. Summary of the database entries phpbb3 makes to track unread posts via the database a. clicking "mark forums read" link on index page: - sets user_lastmark for the user in the users table to the current time - wipes out all entries for the user in the forums_track table - wipes out all entries for the user in the topics_track table b. clicking "mark topics read" link on viewforum page for a forum: - sets mark_time for the user and that forum in the forums_track table to the current time - wipes out all entries for the user and that forum in the topics_track table c. opening up existing topic that is already read - does nothing d. opening up an existing topic that is unread: - via the markread() function, sets mark_time for the user and that topic in the topics_track table to the post_time for the last post of the last page in the topic that the user read - if there are no other unread topics in the relevant forum, then via the update_forum_tracking_info() function: - sets mark_time for the user and that forum in the forums_track table to the post_time for the last post in the relevant forum - wipes out all entries for the user and the relevant forum in the topics_track table e. new topic or reply to existing topic: - via the markread() function, sets mark_time for the user and that topic in the topics_track table to the post_time for the new topic or reply - if there are no other unread topics in the relevant forum, then via the update_forum_tracking_info() function: - sets mark_time for the user and the relevant forum in the forums_track table to the post_time for the last post in the relevant forum - wipes out all entries for the user and the relevant forum in the topics_track table