forum posts "read" and "unread"
i am working on developing a 开发者_如何转开发forum
my predicament is this - i know how to code every single aspect of the forum. however, one thing that kind of boggles my mind is how you would go about showing an icon for unread posts like the bigger forums do it.
i am wondering what is the best way to do this? i need to make this so that it would support millions of posts and members without creating a large amount of database lag.
does anyone have any tips that could help me out here?
Often times, this is done by the last login time. So, if there are any new posts since the user last logged in, they are flagged as new. This is extremely efficient, as you only need the last logged in date/time, and the date/time of posts. This data you probably already keep track of anyway.
If you instead would like a flag for each post you would need to store this in a database. This kind of thing wouldn't be so useful anyway, as not everybody will read every post.
精彩评论