View Full Version : marking posts/threads as read
bira
Sun 9th Dec '01, 12:12pm
Hi,
I'm trying to understand how vBulletin 'decides' if a post or a thread have been read by the users. Can you please explain it to me?
I'm a bit confused, because on the one hand I can post a reply and go back to the forum page, and that thread where I just posted will be marked as unread -- because my own post is new -- but if it took me over 5 minutes to write that reply, all other threads/posts, which I haven't even read, are already marked as read.
I'd like to help improve this, but I need to understand how it functions right now.
Any way that this could develop into a discussion on how to improve the current procedure?
Thanks,
Bira
Wayne Luke
Sun 9th Dec '01, 6:22pm
Simple... It is cookie based. When you load a page, a "lastvisit" cookie is loaded to your page. Anything older than this is "read" and anything newer is "unread" until you click on it.
Once you click on a thread to read it a temporary session cookie is written that marks it as read.
bira
Sun 9th Dec '01, 11:35pm
Wayne, so if I am taking my time in one page with no seeming activity (eg long reply or reading a long thread) for more than like 5 minutes (cookie timeout is set on 300 secs on my board), everything will be marked read?
tubedogg
Mon 10th Dec '01, 3:41am
Correct - that's why we recommend setting your cookie timeout to 900 seconds (15 minutes).
bira
Mon 10th Dec '01, 3:44am
oh, ok.
I think it was set on 300 seconds way from 1.x by default. I never changed that value.
I'll change it now, thanks.
I was trying to think of ways of more accurately setting read/unread status for each registered user, per thread/post. But the more I look at it the more I realize it's not so plausible. With 10,000 users and 600,000+ posts, keeping tabs for each would be even worse than the searchindex table! :D
tubedogg
Mon 10th Dec '01, 3:46am
Finally, someone understands the implications! :D I've been trying to convince users here of that for a long time, that it just wouldn't be feasible.
What *would* be feasible, and will with any luck be in v3, is per-forum read marking, where you have a lastvisit for each forum as opposed to the board as a whole.
bira
Mon 10th Dec '01, 3:49am
Originally posted by tubedogg
What *would* be feasible, and will with any luck be in v3, is per-forum read marking, where you have a lastvisit for each forum as opposed to the board as a whole.
Oh wow, that would be an improvement!
Thanks Kevin!
tubedogg
Mon 10th Dec '01, 4:16am
np :)
DVD Plaza
Mon 10th Dec '01, 8:21pm
Originally posted by tubedogg
Finally, someone understands the implications! :D I've been trying to convince users here of that for a long time, that it just wouldn't be feasible.
It never will be so long as vBulletin continues to think in that scale - I fail to see why any member would want to know the precise read status of 1 million threads since their very first visit.
What users do want is to not have every single "recent" thread suddenly marked read because they weren't clicking for 15 minutes. If you work on an "as need" basis to that scale it becomes quite a trivial task to track that - basically a readtracking table containing what you already store in the cookies for a timespan since their previous day visit but a row existing for that member only if they have visited in the past 24 hours (with a TTL of 24 hours itself) and a pointer in the member table to their record in the readtracking table.
Thus so long as you visit within a 24 hour period (or configurable), then the status of "recent" threads will be retained else they'll reset as they do presently.
Whether it's completely necessary is another matter, but to constantly dismiss the tracking of threads as being impossible is silly - anything is possible, it's just a matter of working out how.
samtha25
Thu 17th Jan '02, 2:35am
Originally posted by DVD Plaza
Whether it's completely necessary is another matter, but to constantly dismiss the tracking of threads as being impossible is silly - anything is possible, it's just a matter of working out how.
Being able to better track read and unread threads is what our members most ask for. As it is, it's nearly useless with forums like ours where people often take a long time composing messages. I hope someone read your message. I've often thought exactly the same thing.
tubedogg
Thu 17th Jan '02, 8:17pm
Originally posted by DVD Plaza
I fail to see why any member would want to know the precise read status of 1 million threads since their very first visit.Me either but that is what everyone always asks for. Apparently EZBoard does this (?) and possibly another board, not sure, but what is asked for is "If I don't read a thread it should never be marked read" which is what is impossible. This is the first I've seen someone ask for a more limited version of that, which is more feasible.
MattR
Fri 18th Jan '02, 12:07am
Originally posted by DVD Plaza
you work on an "as need" basis to that scale it becomes quite a trivial task to track that - basically a readtracking table containing what you already store in the cookies for a timespan since their previous day visit but a row existing for that member only if they have visited in the past 24 hours (with a TTL of 24 hours itself) and a pointer in the member table to their record in the readtracking table.
I could see something like that but it would require some pre-fetch before the user visits, which I don't like...
To take some numbers from FanHome -- if I'm reading correctly:
2600 distinct userIDs have visited in the last 24 hours
1423 distinct threads have had a post in the last 24 hours (does that include new threads w/no replies?)
2600 * 1423 = 37,567,200
That's a lot of threads to keep track of. :D
It may work for smaller sites, but in that case it's not hard keeping track of what you've visited since there are a handful of threads that may have been updated since you've last visited. For larger sites a 37 million-row table is unacceptable. :)
It sounds like a good idea but again I dislike the idea of pre-fetching rows (which I think you'd have to do) on a 24 hour basis. What if the user doesn't visit in the next 24 hours? Then I have wasted a lot of rows.
Maybe something like this..
User XYZ opens the forums on some page. If they have referenced it (e.g. I think they should have to opt-in to per-thread tracking) and it has been X (some definable value) hours since they have last visited, go ahead and load some threadIDs into a temp table and give it an hour time limit (something small to keep the size down but not 7 minutes). Then as they read the threads remove the ID from the table.
What to do if the user doesn’t read all of the threads which are marked as ‘unread’ and then wanders away for the day is a touchy subject… On the one hand, you can leave them in there and have them pre-fetched for the user (and give it a several day TTL) or you can clear them out after a couple hours. I don’t think it can be a ‘one-size-fits-all’ solution – it depends on your forum and the traffic patterns you have; if they like to read for a couple hours and come back then having the threads pre-fetched then it is certainly more efficient than clearing out and re-populating the table every 2 hours.
Daroz
Fri 18th Jan '02, 12:18am
Originally posted by tubedogg
Apparently EZBoard does this (?)
From someone who has to use (not administrate, thank goodness) EzBoards....
You can mark a 'forum' read, but not individual threads.
Also one of the nice things about HOW it marks them read is the date/time (sec since epoch or some derivation) is sent with the request so any new posts since that page was loaded and you click the link are NOT marked read.
It's a step in the right direction for boards with many forums and alot of activity.
Though the n** nature of the storage needed to mark every thread read/unread scares the living crap out of me :(
vBulletin® v3.8.0 Beta 4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.