Nov 6, 2002, 1:05 PM
Post #1 of 1
Always good to be user friendly, need help with a feature...
This probably isn't that hard, but will take a little thinking about, I have got it working, but not perfectly. Let me explain.
I have built a forum for my site (similar to UBB, very similar in fact) This should give you a good idea of the application. I would post a link but it has a few security bugs ATM, which I want to fix before I let anyone near it.
Anyway, as UBB and most other forums do, I want the coloured folders to signify when a forum or topic has unread topics/posts (respectively) in them.
The way I originally tried to do this was:
When the user logs in, a cookie is stored to their computer, it contains their username and password, along with the date and time. This is the last login date and time.
When a post is made the date and time are recorded (not in the cookie). When the page is loaded it checks the post date against the date in the cookie, if the date is newer than the cookie date is signifies new posts in the forum (that works fine).
You go into the forum and the same thing happens and it works fine. BUT,
There is an innacuraccy or two:
1. if the user logs in, and doesn't have to login again for a month (due to the cookie) then there will always be new posts, even if there isn't. I could update the cookie on visit, but then the dates would match and it wouldn't work properly. What if they check one forum but not others, the forums are working on the same data etc.
Get my drift.
Also when a post is read the "new posts" icon doesn't update.
HOW do I do this, I would imagine I am going about it the wrong way. Any help here would be greatly apprecated. If you want to see what I'm trying to do, look at a forum package (i.e. UBB r VBulletin or the likes). Its pretty much a standard feature.