Forum Moderators: rogerd

Message Too Old, No Replies

New post marker

trying to improve how forums flag posts as new

         

chadmg

6:05 pm on Dec 2, 2004 (gmt 0)

10+ Year Member



This may be more of a programming exercise, but I thought this question applies to this forum most. What do you think is the best method for keeping track of posts a member has read? Should you store a very large array of posts that the member has visited in your database? Should you store this in a session variable and only store the last hit time in your database? Would members want something this detailed? Is it better just to show them which posts are new since their last visit?

This feature doesn't seem to work very well in most forums, so I'm trying to think of a better way to do it.

FourDegreez

8:03 pm on Dec 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It definitely doesn't work well in many forums, I'll agree to that. And I really wanted to avoid a huge matrix of which members have read which posts. I figured that for scaling purposes, this was a bad idea as the size would grow exponentially as new members joined.

However, in the end I saw no other solution (due in part to reasons that go outside the scope of this thread). So the compromise I made was to store the posts read per member for the last two weeks. After two weeks, that data is archived in a separate "historical" table and deleted from the "live" table. The result is that a post is declared no longer new to you if a) you've read it, or b) two weeks have passed, regardless of whether you've read it. Psuedo-programmatically, the post is new if post_date > CURRENT_DATE - 14 AND NOT EXISTS(SELECT 1 FROM viewed_post WHERE post_id = abc AND member_id = xyz)

If you run a forum where people only check back once every few weeks, this is not a good solution for you. But it seems to work well in my case. I'm hoping it will scale well. Having accurate new post markers is hugely cool.

chadmg

2:58 pm on Dec 3, 2004 (gmt 0)

10+ Year Member



That's a good solution FourDegreez. I've thought about this a lot now and I just come up with more questions. I have a database right now that serves as a log. It's just a lot easier to compile information from a database than a text log. But right now, I'm not storing any information that ties a user with the log. Actually, I just lied. I store the IP address in both the member table and the log table. So I could actually compare them. But I just started thinking about adding an extra field to the log table for member id. Now it would be intensive to run a select statement on a table this large just to provide page last visited information, but it may work.

My new question is, would doing this turn people off as far as privacy goes? This information could be useful to track where a member has visited, both for the forum and for the member. I could create a history page for them, so they could back track to a page they've visited in the past. Is it such a bad thing, since I could just look this up byu IP? Does this question maybe belong in a new topic?

So if this is an invasion of privacy, should I just store this information in a client-side cookie? I can create two different cookies, a forums visited cookie and a topics visited cookie. If the cookie gets to big I could either pop the oldest visit time off or create additional cookies.

rogerd

1:26 pm on Dec 6, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>>Is it better just to show them which posts are new since their last visit?

Interesting topic, Chadmg. I think this is the most common method, because it's easy to program and requires minimal record-keeping.

It's not the best approach, though, as it doesn't really show what has been read in most cases.

A client-side cookie would work for some, but many forum members use multiple PCs and would experience inaccurate data.

The thing I wonder about is how many forum members really use this feature, or would use it if a truly sophisticated indicator was available. I've had questions about it on my forums, so I know that SOME people use it; it just isn't clear how pervasive the usage is.

FourDegreez

2:29 pm on Dec 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In my case, I'm using the "wwwboard" style threads with branching reply structures, which can get difficult to navigate through and find new posts without some sort of marker. In the absence of the marker, people would use new vs. visited link color as a rudimentary marker, but of course that fails for people who use multiple computers. The format of your board can make the markers more or less important.