Sign in to follow this  

[web] Old and New posts in a message board type thing

This topic is 3297 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there any commonly accepted method for determining if a user of a website has read a forum message or not? e.g. here on GameDev.net, the little blue folder means "old post" and the green one means "new post". Cookies would prevent users from using more than one computer, and would also fail if said user clears their cookies or if more than one user accesses the site from the same computer. Storing a per-user-per-thread flag in the database would not be reasonable either, as it would quickly end up with me storing a ridiculous amount of data (number of users X number of threads). My current thought is to store a per-user-per-category timestamp serverside (I'm calling it category, an example would be this "Web Development" category in the gamedev.net forums) which would be updated to the last edit date of the last thread viewed in that category. However if a user reads a newer message first it would mark all the older unread ones as "old"; this is my best bet so far I think, so they might have to suffer through it. My googling has failed me on this one, and I'm not really interested in downloading several forum software packages just to have to dig through their code to figure out a common method for this one thing. My project is not a forum exactly (which is why I am rolling my own), but it is close enough for this to be relevant. Thanks!

Share this post


Link to post
Share on other sites
Most sites I know do it per session. All posts between the time of the last visit of the previous session and the current time are new posts. Track all posts that the user sees and mark them as visited. You can do this in the database or in a cookie. In the mean time, track the session and update the timestamp on it. When the user logs out or the session expires, remember that timestamp. Anything posted after that timestamp when the user creates a new session should be marked as unread.

Share this post


Link to post
Share on other sites

This topic is 3297 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this