View Full Version : How do forums save read threads etc?
Cagez
May 30th, 2003, 16:39
As title reads!
Do they use cookies? Thats allot of cookies...
dawizman
May 30th, 2003, 22:40
Mysql database
notnamed
May 30th, 2003, 22:47
You knew that Cagez...didn't you?
Either that or flat-files.
Cagez
May 31st, 2003, 12:05
Yeah, I figured that much but I'm looking at my vB database and I can't seem to find anything that keeps track of it :confused2
CareBear
May 31st, 2003, 15:19
All you'd need to keep track of was the last post id which is done on both the client (with a cookie) and in the database (because if you log on to another computer you still on see the ones you haven't read as unread and not all of them).
Whichever thread that has a higher last postid then the one in the cookie or the database would be one you haven't seen :)
(Actually looking at the cookie here vB keeps track of the last time you accessed any part of the forum.. so whichever thread has posts in it that were made after that time are unread/new ones)
Cagez
May 31st, 2003, 15:22
Yeah, thats easy, but lets say that I look at 3 out of 5 new threads, how does it keep track that I've seen those three and not the other 2?
notnamed
May 31st, 2003, 15:28
I read your title wrong...thought you meant how do forums save/read threads, not as in save the threads you've read. Well, there are various ways...flat-files and mySQL are the most common. I don't know how they work but I can give you the contact info of someone who does :classic2:
Canuckkev
May 31st, 2003, 15:35
My guess is there is a column for each user that stores that info. Once you go away for a while, it counts the ones you didn't read as being read. It could also be a cookie...or something to do with sessions.
Cagez
May 31st, 2003, 16:02
Yeah, I thought there would be some sort of column too, but I cant seem to find it in my vBulletin database :confused2
CareBear
May 31st, 2003, 16:08
Originally posted by Cagez
Yeah, I thought there would be some sort of column too, but I cant seem to find it in my vBulletin database :confused2 it doesn't do that does it? :confused:
Each time I come here everything from before my last visit is always marked read whether I actually read it or not :confused2
notnamed
May 31st, 2003, 16:27
Newer versions act differently CareBear. I've been on a few betas of vB3 and they stay unread until you read them, very nice feature.
Cagez
May 31st, 2003, 19:30
Ah, your right care bare.... I think iPB does it the way vB3 does, so I guess I'll install that and give it a looking at.
<edit />
Nope, ipb doesn't do it either. Meh, I guess Ill just do it the normal way...
conkermaniac
May 31st, 2003, 20:53
Well, as far as I know, forums store the "last visit" date/time as a cookie on your computer, and then compare the dates of the last post of each thread with the date stored in your cookie. :confused2
Cagez
May 31st, 2003, 22:12
Originally posted by conkermaniac
Well, as far as I know, forums store the "last visit" date/time as a cookie on your computer, and then compare the dates of the last post of each thread with the date stored in your cookie. :confused2
Yep, thats what carebare said. I was looking for a more precise way of 'non-read messages'. As it currently stands, if you look at say, 2 out of 3 new topics, then come back a bit later the third topic will be counted as read even though you haven't read it.
dawizman
June 1st, 2003, 00:51
hmm, i think what it does is records the last time you were at the forum, and then after 15 minutes, if you come back, all previous un-eads are marked read and all posts after the recorded time are marked un-read.
conkermaniac
June 1st, 2003, 09:25
Originally posted by Cagez
. I was looking for a more precise way of 'non-read messages'. Yes, I am too, but the only way I can think of is to store the status of every single thread in a cookie (bad) or in the database (worse). :confused2
CareBear
June 1st, 2003, 09:30
Originally posted by Cagez
Yep, thats what carebare said. I was looking for a more precise way of 'non-read messages'. As it currently stands, if you look at say, 2 out of 3 new topics, then come back a bit later the third topic will be counted as read even though you haven't read it. Invision does it half like that.. all through your visit (and up till 20-30 minutes after you last page view) it will show which threads you've read and which you haven't yet) but if you come back an hour after that everything would be read.
That's something that would be easy to impliment with session state.
trenzterra
June 1st, 2003, 09:52
Shrugs, I think they store it together with each user's profile and stuff.
Cagez
June 1st, 2003, 09:55
Originally posted by trenzterra
Shrugs, I think they store it together with each user's profile and stuff. They store the last log in time in the user's profile 'stuff', not each and every thread ;)
keith
June 2nd, 2003, 15:04
each message is stored with a timestamp, and every time your sessions ends it records the timestamp in your profile as well.
next time you log in, it compares your last timestamp with the timestamp of the last message of each thread you view.
sounds good to me, but i'm no expert.
CareBear
June 2nd, 2003, 16:15
Originally posted by keith
each message is stored with a timestamp, and every time your sessions ends it records the timestamp in your profile as well.That's already been discussed and dismissed :)
Apparantly if there are 2 messages, you read A but not B, then his will show the next time you visit C as unread (was posted after your last visit), A as read (since you read it earlier) but B still remains unread until you actually read it.
keith
June 2nd, 2003, 18:25
Originally posted by CareBear
That's already been discussed and dismissed :) how'd i miss that? :confused2
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.