Re: Marking comments as read

2010-01-28 Thread asbestospiping
That makes a lot of sense, I think it puts me on the right track. On Jan 27, 7:47 pm, cricket zijn.digi...@gmail.com wrote: and removing the viewed rows in the db when a comment is added I don't understand what you mean by that. If it's what I think then I'd guess it would require a lot of

Re: Marking comments as read

2010-01-27 Thread asbestospiping
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

Re: Marking comments as read

2010-01-27 Thread cricket
and removing the viewed rows in the db when a comment is added I don't understand what you mean by that. If it's what I think then I'd guess it would require a lot of writes to the DB. I did put something together last night. It's a bit rough around the edges but it's a start. It involves code

Marking comments as read

2010-01-26 Thread asbestospiping
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

Re: Marking comments as read

2010-01-26 Thread John Andersen
Can I understand that you are only showing one comment at a time, even together with a post? In case that is correct, then one solution is to specific read all the ViewedComment records for the post and the user, and ask in the view, is the current comment in the ViewedComment array of records.

Re: Marking comments as read

2010-01-26 Thread cricket
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