[Pugged] Tracking Read Topics/Messages, and the "unread" flag.

Chris Van Cleve ciapug@ciapug.org
Fri, 6 Sep 2002 13:17:57 -0500


It sounds like either:

1. Your code compares against the value stored for last visit

or

2. Your code to update the last visit timestamp isn't segregated from the active list, so it updates the timestamp on each load of that page.

I could be wrong.

---------- Original Message ----------------------------------
From: "Chris Hettinger" <chris@efr.org>
Reply-To: ciapug@ciapug.org
Date:  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.
> 
>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.
> 
>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".
> 
>What I hoping for in asking is either some pseudo code or a good description 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.
> 
>Thanks for any help.
>(if you received this twice, my apologies I didn't see it go through the first time I sent it)
> 
>Chris Hettinger
>cjh@raccoon.com
>
>_______________________________________________
>Ciapug mailing list
>Ciapug@ciapug.org
>http://cialug.org/mailman/listinfo/ciapug
>