Roland_D Posted September 8, 2011 Share Posted September 8, 2011 Hello everybody, I have a question I've been striving with for a while and I was wondering if someone more experienced than me could have an answer or point me in the right direction. I'm building a website with an integrated forum what is the best system to detect and return which post is 'new', which one is 'hot' and which one hasn't changed from the user's last visit? In my user's table I store the last time the user logged in and the last time the user browsed a page... but it seems to be not enough to accurately return the information I need... Any suggestion is appreciated. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/246728-old-new-hot-posts/ Share on other sites More sharing options...
xyph Posted September 8, 2011 Share Posted September 8, 2011 Good discussion on that here: http://stackoverflow.com/questions/2288814/php-forums-how-to-cope-with-unread-discussions-topics-posts/5045827#5045827 Quote Link to comment https://forums.phpfreaks.com/topic/246728-old-new-hot-posts/#findComment-1267073 Share on other sites More sharing options...
Roland_D Posted September 8, 2011 Author Share Posted September 8, 2011 Thanks for the link... Well unfortunately all the solution provided are very 'heavy' on the database as they store user by user data on what they red or not... I needed some 'dirty trick' eheh to work around this problem.. Quote Link to comment https://forums.phpfreaks.com/topic/246728-old-new-hot-posts/#findComment-1267158 Share on other sites More sharing options...
xyph Posted September 8, 2011 Share Posted September 8, 2011 The thread points out some tricks. Most of which are inaccurate. Generally, the lighter you want to be with this solution, the less accurate your outcome will be. The common one is to use last viewed date along with last post date to decide if it's been added or modified since your last visit. Quote Link to comment https://forums.phpfreaks.com/topic/246728-old-new-hot-posts/#findComment-1267162 Share on other sites More sharing options...
Pikachu2000 Posted September 8, 2011 Share Posted September 8, 2011 Work around what problem? Quote Link to comment https://forums.phpfreaks.com/topic/246728-old-new-hot-posts/#findComment-1267163 Share on other sites More sharing options...
Roland_D Posted September 8, 2011 Author Share Posted September 8, 2011 The thread points out some tricks. Most of which are inaccurate. Generally, the lighter you want to be with this solution, the less accurate your outcome will be. The common one is to use last viewed date along with last post date to decide if it's been added or modified since your last visit. Yes I saw... I currently use the last_action table to match the last post in the forum and update the last action when the user clicks on the thread... the problem as you can imagine is that when you go back to the thread list your last action's time is updated so you won't be able to see which post is new... Quote Link to comment https://forums.phpfreaks.com/topic/246728-old-new-hot-posts/#findComment-1267207 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.