Welcome Guest, Not a member yet? Register   Sign In
Building a Read vs Unread Status for a Forum
#9

[eluser]andrewtheandroid[/eluser]
hey jedd i "skim read" that article (still took me more than 30min to partially digest) haha.. yeh I now see the folly of my rash answer. hmmm when I was reading the suggestions in my head I sort of thought what I'd do. Lets say we are only really interested in the last (say 30) topics.

Code:
last_read_table (restrict to 30)                     query_result_last_30
userid | topicid | timestamp                         topicid | timestamp

each time the user reads you add the topicid to the timestamp
each time someone creates a new post or topic update timestamp

then compare each table for "read" results. I guess extra fields like last_post_id is needed to link them to the one after they read. so each time they refresh the page you do can pull the last timestamp from the userread table and then search any new updates since last timestamp to make it "less expensive". or you can limit to a smaller size like 10 or 20.

I guess you can have users manually subscribe or bookmark sites in which it searches through that list and tracks changes. Also you could allow the "hardcore" users to set this size limit from 30 to 100.. or something like taht.

I'm curious to know what you decided in the end?! I'm making a new site at the moment and will most likely have to implement a forum so I thought it's probably better to start thinking of these things now that you mentioned them! Thanks for reading.


Messages In This Thread
Building a Read vs Unread Status for a Forum - by El Forum - 11-04-2009, 10:21 PM
Building a Read vs Unread Status for a Forum - by El Forum - 11-04-2009, 10:39 PM
Building a Read vs Unread Status for a Forum - by El Forum - 11-05-2009, 12:15 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-05-2009, 08:23 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-05-2009, 09:45 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-05-2009, 09:58 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-05-2009, 10:11 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-05-2009, 11:51 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-05-2009, 01:06 PM
Building a Read vs Unread Status for a Forum - by El Forum - 11-05-2009, 06:52 PM
Building a Read vs Unread Status for a Forum - by El Forum - 11-05-2009, 07:39 PM
Building a Read vs Unread Status for a Forum - by El Forum - 11-06-2009, 03:35 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-06-2009, 03:40 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-06-2009, 07:14 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-06-2009, 09:12 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-06-2009, 09:17 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-06-2009, 09:24 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-06-2009, 09:31 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-06-2009, 11:29 AM
Building a Read vs Unread Status for a Forum - by El Forum - 11-06-2009, 12:50 PM
Building a Read vs Unread Status for a Forum - by El Forum - 11-06-2009, 03:04 PM
Building a Read vs Unread Status for a Forum - by El Forum - 11-06-2009, 04:22 PM
Building a Read vs Unread Status for a Forum - by El Forum - 11-06-2009, 06:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB