rempires Posted July 1, 2007 Share Posted July 1, 2007 I've run into a problem with efficiency, again... For my site I'm building my own forums (there are many reasons i choose to do that instead of using phpBB or SMF or something like that) , anyway my problem is i can't really seem to figure out a good way to determine if a topiuc or thread was read/unread by a user. my forum is organized category-topic-thread-post. The category is not something click-able or anything just a general way to organize all the topics. I mainly want to be able to tell if the user ahs opened that topic (example: general discussion) since there has been a new thread or post posted in it. The only way i can think of doing this is adding a field for each user in the members table that has each of the topics and when the suer last opened them and compare it to the last post/thread creation date of that topic. before i do this i wanted to see if anyone here ca think of a better/more efficient way of doing this. If this confused you please say so and i'll try to clarify what i'm saying, any ideas would be helpful. thanks in advance, john Quote Link to comment Share on other sites More sharing options...
azisnomarsa Posted July 1, 2007 Share Posted July 1, 2007 Well, using log files would be great soulution. If you dont plan to have very much users you could create log file for everyone, and the just read from it and with php parse how will look the thread. smth like that. Quote Link to comment Share on other sites More sharing options...
rempires Posted July 1, 2007 Author Share Posted July 1, 2007 thank you for your advice but i've actually decided to aplce cookies on each user and use the cookies to show which topics they visited at what time, so if there has been a post after that time then make it so it was unvisited, it seems to be the best way i can come up with Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted July 1, 2007 Share Posted July 1, 2007 I don't think that is the best way at going about it. Users can erase their cookies, so once they do that...the whole forum is going to show invalid results. Quote Link to comment 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.