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

Angie Tollerson ciapug@ciapug.org
Fri, 06 Sep 2002 13:25:05 -0500


This is a MIME message. If you are reading this text, you may want to 
consider changing to a mail reader or gateway that understands how to 
properly handle MIME multipart messages.

--=_DA869204.DABBD8FF
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

P.S. The reason your messages are getting marked read is because when
you go to your listing page, you right up to the database they have
visited that day, they read a story, and then go back to the listing
page. The listing page looks at the database, sees they have visited
today, and decided nothing is new. Make sense?
 
Angie Tollerson
Alliance Technologies
Web Programmer
(515)245-7628
tollerson@alliancetechnologies.net

>>> Tollerson@alliancetechnologies.net 09/06/02 01:22PM >>>

Chris,
Hey bud!
The problem with what you are trying to do is combine two different
sets of data into one and it just isn't going to work that way.  If you
want to have a field for each unique user that keeps track of the id of
the posts they have read, and then check that column when they log in
for ones they have read/not read, you can do that. OR you can keep doing
the logic where it shows any since their last visit based on the day.
But you can't do both.  One is based on dynamic data (the current date)
while the other is based on what they have viewed and marked in the
database.  And keeping track of every post a person has read causes
extreme overhead in the database, and would be tough to sift through. 
It's doable, but it's going to be large.  If you do it that way, there's
no need for the whole date thing since it's displaying "new" for a post
based on the individual not reading it already.  So..it's one or the
other..I would be lazy and opt for the date thing, hehe.
 
Angie Tollerson
Alliance Technologies
Web Programmer
(515)245-7628
tollerson@alliancetechnologies.net 

>>> chris@efr.org 09/06/02 01:09PM >>>
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 


--=_DA869204.DABBD8FF
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2719.2200" name=GENERATOR></HEAD>
<BODY style="MARGIN-TOP: 2px; FONT: 8pt Tahoma; MARGIN-LEFT: 2px">
<DIV><FONT size=2>P.S. The reason your messages are getting marked read is 
because when you go to your listing page, you right up to the database they have 
visited that day, they read a story, and then go back to the listing page. The 
listing page looks at the database, sees they have visited today, and decided 
nothing is new. Make sense?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>Angie Tollerson<BR>Alliance Technologies<BR>Web 
Programmer<BR>(515)245-7628<BR><A 
href="mailto:tollerson@alliancetechnologies.net">tollerson@alliancetechnologies.net</A></FONT><BR><BR>&gt;&gt;&gt; 
Tollerson@alliancetechnologies.net 09/06/02 01:22PM &gt;&gt;&gt;<BR></DIV><FONT 
face=Tahoma size=1>
<DIV><FONT size=2>Chris,</FONT></DIV>
<DIV><FONT size=2>Hey bud!</FONT></DIV>
<DIV><FONT size=2>The problem with what you are trying to do is combine two 
different sets of data into one and it just isn't going to work that way.&nbsp; 
If you want to have a field for each unique user that keeps track of the id of 
the posts they have read, and then check that column when they log in for ones 
they have read/not read, you can do that. OR you can keep doing the logic where 
it shows any since their last visit based on the day. But you can't do 
both.&nbsp; One is based on dynamic data (the current date) while the other is 
based on what they have viewed and marked in the database.&nbsp; And keeping 
track of every post a person has read causes extreme overhead in the database, 
and would be tough to sift through.&nbsp; It's doable, but it's going to be 
large.&nbsp; If you do it that way, there's no need for the whole date thing 
since it's displaying "new" for a post based on the individual not reading it 
already.&nbsp; So..it's one or the other..I would be lazy and opt for the date 
thing, hehe.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>Angie Tollerson<BR>Alliance Technologies<BR>Web 
Programmer<BR>(515)245-7628<BR><A 
href="mailto:tollerson@alliancetechnologies.net">tollerson@alliancetechnologies.net</A></FONT><BR><BR>&gt;&gt;&gt; 
chris@efr.org 09/06/02 01:09PM &gt;&gt;&gt;<BR>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.<BR><BR>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.<BR><BR>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".<BR><BR>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.<BR><BR>Thanks for any help.<BR>(if you received this twice, 
my apologies I didn't see it go through the first time I sent it)<BR><BR>Chris 
Hettinger<BR>cjh@raccoon.com<BR><BR>_______________________________________________<BR>Ciapug 
mailing list<BR>Ciapug@ciapug.org<BR><A 
href="http://cialug.org/mailman/listinfo/ciapug">http://cialug.org/mailman/listinfo/ciapug</A><BR></DIV></FONT></BODY></HTML>

--=_DA869204.DABBD8FF--