[Pugged] Tracking Read Topics/Messages, and the "unread" flag.
Chris Hettinger
ciapug@ciapug.org
Fri, 06 Sep 2002 13:09:36 -0500
I have been working on a project for a while to write my own forum and I =
have had a bit of a hang up on one area. I was hoping I could get some =
direction on this.
=20
When the user visits the forum the first time I write a time/date stamp =
into his profile for the last visit. Upon their return I grab that =
time/date stamp create a variable to hold it then update the profile with =
the current time/date. While that page is cycling through the forums to =
display I check each forum's last post time/date and compare that to the =
last visit. If there has been traffic more recent than the last visit, it =
gets marked "New" to indicate new posts... I do the same with the page =
which displays each of the topic in a forum.
=20
However I am getting stuck here; If you are the user and this is a return =
visit, you are looking at the topic list for a specific forum, and there =
are 5 new or updated topics since your last visit they are marked with a =
"New" before them in the display. You select the first of the 5 topics, =
view the messages/posts, and then return to the topic listing, all 5 are =
now marked read. Rather, I would like only the topic you just read to be =
marked read, and the 4 remaining to still be indicating "New".
=20
What I hoping for in asking is either some pseudo code or a good descriptio=
n of how a forum usually handles this. Ask any questions I will do my best =
to give you a answer. I will be happy to show the code if needed, let me =
know.
=20
Thanks for any help.
(if you received this twice, my apologies I didn't see it go through the =
first time I sent it)
=20
Chris Hettinger
cjh@raccoon.com