On Jan 22, 2007, at 6:55 PM, Herwig Brunner wrote:
Hi @ all,
I have the following scenario: User A views a page with 3 comments, and add's a new comment. Now User B logs in and views the same page. This User already read the first three comments and now I want that User B get's some kind of visual hit(orange triangle or something like that), that a new comment was added since his last visit.
How should I aproach this Problem?
Any ideas?
Thanks a lot.
This is not something that is currently built in XWiki. Right now the default way to get notified of new comments is by using RSS feeds or by using an email notifier plugin to send emails when new comments are added. That said you're free to do whatever you want but you'll have to code it yourself. You'll need to remember what user has seen what, you'll need to define what "viewing a comment" means, whether the user has to push a button to signify he has view a comment, etc. BTW the same applies to pages too. I'm not sure how you'd hook into xwiki to update the counters when the user has viewed a page or a comment though, which is why I was hinting at the button above. In any case, a user may navigate to a page but without reading it so you'll need to differentiate both cases and the button makes the most sense I think. An easy way would be to add a TagClass object to the page with the name of the user who's marked the page as viewed. Then you could easily run queries to know what pages have not yet been viewed by a given user. To do all this you'll probably need to modify some templates. Hope it helps, -Vincent ___________________________________________________________________________ Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire. http://fr.mail.yahoo.com