PHP forums - how to cope with unread discussions / topics / posts

后端 未结 7 1048
伪装坚强ぢ
伪装坚强ぢ 2020-12-07 17:10

I know this question has been asked here a couple of times, but none of the answers had pleased me. This is because almost all of them involve a huge read / write process re

7条回答
  •  半阙折子戏
    2020-12-07 17:32

    I have read all the answers and I came with an idea that may be the best mix for this subject (no code though).
    This idea is a mix of all of your ideas and the little experience I have in programming
    Aprox 95% of the users (statistics got from a forum admin and his forum logs) read the forum's topics straight to the last post (or page) and don't go back, read the 1st pages' posts (or just the 1st post) and then go to the last page, or they read the whole thread from the beginning 'til the end and if they turn back they had already read that part. So a good solution would work like this:
    I think If we make a store, for each user, for each thread, the timestamp of the last post the user viewed (and, if applicable, the first post the user viewed even if that may not get to be useful) we could get somewhere with this. The system is pretty simple and is almost like phpbb's. It would also be useful to mark the last post we have seen to continue in that one later (instead of being forced to consider all that page as read). And, as each thread has its own id. There's no need to organize like phpbb does.

提交回复
热议问题