Closed Thread Icon

Topic awaiting preservation: Homemade forum, mark threads as read and unread (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=27554" title="Pages that link to Topic awaiting preservation: Homemade forum, mark threads as read and unread (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Homemade forum, mark threads as read and unread <span class="small">(Page 1 of 1)</span>\

 
justin
Nervous Wreck (II) Inmate

From: Stockholm, Sweden
Insane since: Jan 2006

posted posted 02-25-2006 17:25

Hi

I'm developing my own forum and have now come to the stage where I put all the threads into categories. With this I also want to mark the threads as unread or read, depending on the actions made by the user.
I quite early dismissed the idea of using the database to flag the threads for each user and started looking into using cookies instead. With the idea to have all the threads set on "read" as a default, and then if-exist, read the cookie and get the id for all the read threads.
This would obviously result in the effect that since all users have to login to access the forums, all users would have this cookie on their computer.

Is this the "best" way of doing it, or have I missed something here. I've tried to google and search on this issue but there doesn't seem to be that many people out there making their own forums...

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 02-27-2006 08:33

well... there are serveral approaches, but if you want to do something like this, there are only two basic options:
Store for each user which threads he has seen - perhaps in a flash based cookie (which can be larger than the regular cookies),
or
store just a last visit date, mark everything that's newer than 'last visited' as new. Add some funny checks to only update after the user has had a chance to see the threads (hint: store two times...).
You don't get a thread by thread variant, but you're saving a lot of bytes ;-)

« BackwardsOnwards »

Show Forum Drop Down Menu