• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to identify 'unviewed' or 'new' resources?

#1
Suppose I have a resource, it could be a post like a forum, or a comment, or a note, or a file etc. And suppose I have a multiple users that can access those resources. When a user logs in, how do I show them or highlight new resources they have not yet viewed?

These are ways I have thought about doing it.

1. Having A Viewed Table.
I could have a table that records if a user has viewed the resource, but this seems daft to me, because I would need an entry in the table for every user and every resource. This would be an exponentially expanding table as it would be Resources x Users big.

2. Comparing to last login datetime
I could show or highlight all the items created since their last login. But you cannot record the logout time, as users might just shut down the browser. So this method, if someone logs in at say 3pm, and logs out at 5pm, they will see all the things they viewed between those times as new items. Also those items will remain permanently as not viewed, as last login time will not change.
Another big problem with comparing creation date to last login date is also that the user might not view a resource on their current visit, but if they have not viewed it, I want to highlight that fact, even on the next visit.

So method 2 does not really work, but method 1 seems to have to store an awful lot of data to achieve the task.

So is there a method that I am overlooking? At the moment I think I am going to have to go with a viewed table, so whenever you view an item, an entry gets written into the table. I just think this is going to be really clunky though unless there is a more efficient way of doing it.

Any ideas or suggestions or insights into how other people have achieved this would be gratefully received, or even just confirmation that a viewed table is the way to go.

Thanks in advance

Paul.
Reply


Messages In This Thread
How to identify 'unviewed' or 'new' resources? - by PaulD - 05-14-2016, 08:35 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.