Jump to content
Larry Ullman's Book Forums

Recommended Posts

I wrote a forum app sometimes ago and am trying to improve it . I have an issue that is hard for me to solve(I don’t even know how to solve it, I just have the idea), how can I create a notification menu like the one on this site, sitepoint, stackoverflow etc  that display at the top of the menu for  a user about messages that were received on thread or post he start or comment on.

The forum was created using PHP

Share this post


Link to post
Share on other sites

Speaking in high-level generalities, I think there are two parts to this:

  1. Identifying the events that will cause notifications to be created; and
  2. Deciding how to display notifications to the users.

An example of #1 might be creating a notification for a topic creator every time someone posts something in one of their topics. For example, you might create a notification with the ID of the person who posted in the topic and then the ID of the topic creator, who will get the notification.

You can then decide how you want to notify the topic creator. Do you want to send them an email? Do you want to do what Stack Overflow does and have an icon at the top of the site? Do you want both?

If you go with the icon approach, then the simple thing to do is to do a check for unread notifications directed at a particular user every time a user loads a page on the site. You could display the number of unread notifications or something, and once they read the notifications, then the number goes down.

That's the basic gist. If you want to go into more detail, then we can, but hopefully that's a good start.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×