So, on my site im developing a forum, not using a 3rd party script or anyhting entirley from the ground up.. Now ive done everything, forums, catagories, adding posts, viewing posts etc...registrations etc all done too but ive come to a problem. How can i identify new posts?....how can i use php to tell which posts are new and which are read to each user. Im guessing something to do with sessions, any help would be appriciated Tom
Hi, About knew or old post you can sort your table by date. About the other thing I didn't really understand you....
Yes but that wont change the new post indicator .....i need to let the users know which topics have new posts in them since last time they were on, or while they have been on. Ordering would just displauy the newest first, not new posts since the user was last on etc.
Its pretty easy to do so. All you need to do is - Log the user's last visit in the database - Query the posts database for the new posts but display the ones which are were posted from the last time they were online.
Yea but when would the last visit update?..also how would i identify posts that are made while they are online
Well log the visits whenever they visit a new page. Make a log system on every page which logs the current user's activity and clears all activities which are like more that 5-10 mins old. I think this should do what you need.