Not a bad way of doing it, though if I were Clubby I'd see about Radix' way.. after trying a similar idea using the cookies.
Edit: you could do a hint of both - but only test the first 15 topics? So retrieve the ID from the first 15, and in the cookie (ok, or text file) have the post ID and a logical indicator along with it. 1 being read and 0 unread. That could work pretty well..
Tim - the difference in cookies and the text file i suggested is that cookies are stored on clients, so it would be different on each computer you login from. The text file would be stored on the create-games.com server and thus things would be the same no matter where you logged in.
n/a
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
22nd March, 2007 at 13:40:23 -
Not sure if text files are such a good idea, after all databases were created for things like this.
If it's too much of a strain on the database, the date thing is an acceptable but not really failsafe method to use.
Ah yeah, sorry eviscerator/bodoron I wasn't thinking so laterally there I spose :\
We could use a combination of things above.. though its quite a tough thing to sort without having to add more fields to the database for each user and forum topic :| Though the text file thing would be fairly effective, it seems a bit flimsy to me really... but maybe its just that I don't like using text files to store db info, but doesn't seem too secure or ultimately beneficial to any mighty effect.
Some way to limit and read from the first 15 or so topics would be best.. I guess the cookie from a machine could store info in a users' field... like perhaps a number from 1-15 or 0-F or something, and that indicates that the first however many are unread. Though then the sorting of topics would have to alter and depend on ID's etc :\
Problem with text files is that for each user you'd need a file, and NTFS is limited to how many files can be in the same.. doubt i'd hit that (its in the 25,000 range), but I dont like limitations none the less.. I'll code it in to using the database at some point
another option is to have 1 field for each user that stores all forum info separated by commas. Then you could just read this text, parse it and put each entry into its own spot in an array, and then loop through the array.