"Viewed" indicator for news browsing?

Post

Posted
Rating:
#1936 (In Topic #382)
Avatar
Standard member
jacobgkau is in the usergroup ‘Well-settled’

Display an indicator so the user knows if they've viewed something or not

Hello. I'm using Composr for a website primarily dedicated to viewing videos and other content. Because there are hundreds of videos available, I would like to implement a feature that will help logged-in users keep track of the content they have watched.

Rooster Teeth's website is doing exactly what I want to accomplish: if a user has viewed a video, display a small "Watched" indicator over the thumbnail. Here is a screenshot of what I'm talking about. This implementation definitely uses server-side tracking through the user account, rather than cookies, because I can log in on different computers and still get my "Watched" indicators. YouTube has a similar feature, but it's been less reliable in my experience.

So, there are several components to doing this: when a user views a news page, we need to somehow record that that specific user has viewed that specific news article. Then, when we're displaying a news block or a news archive page, we need to recall whether a user has viewed each news entry, and display an indicator over the entries the user has viewed.

Displaying the indicator should be easy to do with Tempcode. My issue is setting up some way to track which users have viewed which news pages. Should we think of it as which users have viewed one news article, or which news articles have been viewed by one user? It seems like I might need to add a custom parameter to news entries for this (for instance, a boolean "VIEWED_BY_USER" parameter), but I'm not quite sure where to start to do that. I'm also not sure how I can have Composr keep track of the data-- can I exploit the feedback system (or some other Composr component) for this, or will I need to interact with the MySQL database directly? We could add a new key to the "cms_news" table, but it would have to be different than the other keys because this one would contain a list of values (users who have viewed this), rather than just one value (like the submitter key.)

As you can see by my website, I've already customised Composr heavily, and I have no trouble getting down and dirty with code. However, I'm not actually a developer (I learn as I go on an as-needed basis), and this is a very complex feature that I'd love to get some outside input on. Thanks in advance to anyone who might be able to help.
Online now: No Back to the top

Post

Posted
Rating:
#1938
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Hi Jacob,

This is what you need:

Content Read Tracking - Composr

It requires template editing and I can't say we regularly test it, but it should do exactly what you need.

Great site you have there :).


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#1940
Avatar
Standard member
jacobgkau is in the usergroup ‘Well-settled’
Wow, thank you! That is exactly what I was looking for. I've got indicators up and running already.

I didn't realize there were so many unofficial add-ons for Composr. I'll be sure to check through those before I make a forum post next time.
Online now: No Back to the top

Post

Posted
Rating:
#1941
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Cool :). We want to see you back on the forum regularly though  :lol:.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

gabriel58, amit.nigam, Manu, Philip, babu, deepu_ms

Forum statistics:
  • 1,298 topics, 5,830 posts, 7,065 members
  • Our newest member is raguragavan
Birthdays:
Back to Top