DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
12th March, 2007 at 16:57:28 -
For a while now, I have noticed that the 'new posts' icons are saved as a cookie (or something) rather than in the user's profile. There is, however, one problem with this, and that's the fact that the status of new posts are different on every PC I am on. This is pretty impractical, as I use up to four different PCs.
Any chance of this being stored in another way? Or would this take up too much database space (though it could be a simple matter of saving an array of unread post IDs)?
Ive taken this into concideration in the past, but it'd be quite a strain on the database, I'll have to think of a way to do it without having to have a seperate feild for each forum
Clubsoft:
Date/time of last login compared against time of the last post in a thread, with everything newer being bulb'd. Wouldn't work exactly the same as it does now, but that's how other forums do it.
- store a text file on the server using every user's id number from the database, as the file name.
- In that text file, store seperate lines of 2 integers. Each line could consist of firstly the id number of the forum thread, then followed by a comma and the number of replies a thread has (for example: "25823, 4").
- Then have a simple function that looks up the forum thread in the aforementioned text file for the user who is viewing the forum. If the amount of replies a thread has is -different- from the amount stored in the text file, it must mean that there are new replies.
This approach would make it universal. One thing i'm not aware of is read time. I assume it is faster for the server to read from a text file than it is to read from a database.