Hey guys,
I'm in the middle of implementing a forum/message board on my website using PHP and MySQL.
At the moment I have logins, multiple forums (General Discussion, Music etc.) and the ability to post new topics and reply to existing topics.
When a user is logged in, I would like to display topics/posts that have been created/replied to since the users last visit. This would work in the same way that phpBB works; the topic title is displayed in a different colour for example.
I was wondering what the best way to implement this would be.
I considered taking a timestamp when the user logged out. When they log in again, any post that has been modified since that time is flagged as new.
While this would work, on phpBB once you view a new post, it is no longer flagged as new and my idea would fail here.
Keeping a list of every post that a user has/hasn't viewed seems very inefficient.
Anyway, I was wondering if you have any suggestions?
Thanks,
Robbie
I'm in the middle of implementing a forum/message board on my website using PHP and MySQL.
At the moment I have logins, multiple forums (General Discussion, Music etc.) and the ability to post new topics and reply to existing topics.
When a user is logged in, I would like to display topics/posts that have been created/replied to since the users last visit. This would work in the same way that phpBB works; the topic title is displayed in a different colour for example.
I was wondering what the best way to implement this would be.
I considered taking a timestamp when the user logged out. When they log in again, any post that has been modified since that time is flagged as new.
While this would work, on phpBB once you view a new post, it is no longer flagged as new and my idea would fail here.
Keeping a list of every post that a user has/hasn't viewed seems very inefficient.
Anyway, I was wondering if you have any suggestions?
Thanks,
Robbie