Hi Roger,
>I can't think of a good algorithm to do it, other than logging each message as read and then comparing the messages against the log file when displaying.
Usually no-one reads all messages in a forum (at least not for a long period of time). Hence, if you always show messages that the user hasn't seen, the number of messages that the user isn't interested in grows over time up to the point where the forum becomes unusable.
Instead you should just store the latest message ID when the user logs in (as CompuServe did). For those, that had to suspend their work in a forum, you can add an option in the login screen to use the previous message number (as the UT did before it had the Time Warp feature). That would allow them to login and get the same messages they did the last time they logged on. For this to work, you need to store the previous message ID, as well.
--
Christof