Re: Marking comments as read
Its a good idea, but i want to be able to see when a user has viewed a
comment, and then act upon that at the end of the day. The solution
i'm going with is tracking the post views, as opposed to the comment
views, and removing the viewed rows in the db when a comment is added.
any thought?
On Jan 26, 9:20 pm, cricket <zijn.digi...@gmail.com> wrote:
> I think the most efficient thing to do would be to update a timestamp
> whenever a user views a post. Maybe have a posts_users table with an
> extra column and use contain to include it in your results. Update the
> column in afterFind() maybe?
>
> Then, in the view, compare the original ts that you got from your find
> () with the Comment.created value. Any newer comments get a class
> "NewComment".
>
> I've never done this, btw. But I happen to be just starting on a
> posts_controller. I think I'll give it a go.
>
> On Jan 26, 11:31 am, asbestospiping <asbestospip...@gmail.com> wrote:> Hi all, I am trying to do something, and cant work out where to start.
> > I have the blog app running, and have the comments paginated under the
> > post. I have auth working, and would like to track when a user views a
> > comment (Think marking as read)
>
> > I have a db table viewedcomments, with the fields id, user_id,
> > comment_id
>
> > I simply want to add the relevent data when a comment is displayed,
> > either on its own, or as part of the post page.
>
> > Any ideas?
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home