Otis wrote:
The thing is that it has to determine when a session starts. I for example want to see all new threads since my last session started. Your example of a re-started session isn't solvable unless indeed the info is kept per forum.
Right hence the underlying problem. At least if you extend the session timeout this would be less of an issue.
Otis wrote:
Now it assumes you've seen all new things in your last visit, so when the session re-starts, the old 'new' things are not new anymore.
Understood.
Otis wrote:
Which indeed might not be the case: it can only say that when you actually viewed the forum, is that what you're suggesting?
What I was saying was, as a simple fix rather than storing a single "Start of Session" datetime, store a "Last clicked in thread" datetime. you could store a cookie for each thread. Maybe expire it in 30 days.
This would allow you rather than displaying new since last login indicators the following indicators:
- New message, show on all messages in the thread with a later date than last forum datetime.
- New message in thread, show on thread if any messages would have new message idicator.
- New messages in forum, show on forum if any threads have new message indicator.
I can't imaging moving session start date from site to thread would change much, because you must be doing the majority of the code anyway. The only difference is you would read a different cookie for each thread rather than the single cookie. If the thread's cookie doesn't exist you just assume all messages are new.
So, each time the user clicks into the thread, you will read the last datetime from that thread's cookie and update it with the current datetime.
Does that make sense?
Then, later you can just migrate the system to store the info in the user profile rather than a cookie. Although, if you are going to make the changes this seems like the easiest part espesially with LLBLGen ( ).
BOb