mmosel Posted March 15, 2008 Share Posted March 15, 2008 Ok, I'm wondering what is the most efficient way for a forum to keep track of whether or not a member has viewed a thread or not, and that updates when a new post is made in the thread. Seems like a lot of data to keep track of lol. I mean, I could create a table with member ids, thread id and a switch if it's viewed or not. And then everytime a new post is made I'd have to go through and reset the switch for every user and for every thread number. That seems like the table could get pretty massive pretty fast. Had anyone dealt with this or have a clue as to the most efficient way to do it is? Quote Link to comment https://forums.phpfreaks.com/topic/96257-keeping-track-of-viewed-threads-for-a-forum/ Share on other sites More sharing options...
fenway Posted March 15, 2008 Share Posted March 15, 2008 I think SMF uses a date. Quote Link to comment https://forums.phpfreaks.com/topic/96257-keeping-track-of-viewed-threads-for-a-forum/#findComment-492994 Share on other sites More sharing options...
mmosel Posted March 15, 2008 Author Share Posted March 15, 2008 Ok, thanks for the reply, but I'm still not sure how that would work exactly. In terms of storing and retrieving the data for each user and each post and/or thread. Quote Link to comment https://forums.phpfreaks.com/topic/96257-keeping-track-of-viewed-threads-for-a-forum/#findComment-493022 Share on other sites More sharing options...
fenway Posted March 17, 2008 Share Posted March 17, 2008 Well, my guess is that it would be a hierarchy. That is, a table with fields such as user_id, board_id, topic_id, message_id, and a date/time. You simply add whatever level of detail is necesarry -- if someone selects "mark board as read", leave out topic/message... etc. Quote Link to comment https://forums.phpfreaks.com/topic/96257-keeping-track-of-viewed-threads-for-a-forum/#findComment-493700 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.