开发者

PHP: idea of making viewed notification

I have a notification pa开发者_如何转开发ge. If you get new notifications (viewed column in the database is "0") then it gets highlighted.

I just need an smart way to know that the user has seen the notifications.

Right now it sets all the user´s notifications to viewed "1" (user has seen them) after the first time you go to "My notifications" page.

How can i know that it has been viewed the right way/best way possible?

I mean it wouldnt be smart to make a function that sets viewed to "1" by clicking on the notification. What if you have like 60s ?

Maybe should i make this click, plus at the top "mark all as seen" or something..?

Any good and logical solution?


First of all, you can never guarantee the way your users will use your program, but that's a whole other issue.

If it's a "notification", I could see doing something similar to this site. Some unobtrusive box that goes away once the user clicks a "close" button.


in zabbix we have lots of notifications shown to users. The politics are:

  • Notification is marked as seen when a "close" button is clicked (ajax request to server is sent to update the records)
  • Notifications are marked as seen after N seconds, when N is a configurable value.


In my admin section, I leave notifications for my authors and editors. These are all highlighted until the user clicks through to the permalink for the notification or clicks the "mark as read" button. Each notification is distributed to users with a column called "read" with 15=not read and 16=read. But the highlighting is not so bold: a slight color change and the notification title is bolded.

Works for me, but perhaps you were thinking larger than that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜