Jump to content






Photo
* * * * * 3 votes

IP.Board 3.1: Notifications

Posted by bfarber , 15 January 2010 · 8,100 views

It's a well-known fact that one method of ensuring continued visitation of your site is to email members frequently to send reminders and notifications. For instance, if a user posts in a topic, they may forget that they posted after a day or two. If an email is sent to that user after someone else replies, however, it can remind the original user to return to your site to check on the updates.

IP.Board has a strong system of notifications, however we found that much of the code to handle this is scattered and duplicated throughout many files in IP.Board 3.0. The methods of managing your notification preferences are also inconsistent, making it confusing and difficult for new users to determine how to control notification preferences. If you are a moderator, you manage your report center notification preferences in the report center. You are only able to get email notifications of tracked topics. You can select to get email or PM notification of new comments and friend requests in your user control panel. Through these few examples, you can see that managing notification preferences can be made easier.

IP.Board 3.1 introduces many improvements to notifications, both on the backend and within the user interface of the board itself.

Inline Notifications
In overhauling the notification management options in IP.Board 3.1, we decided to add inline notifications. Essentially, this is a notification within the board itself, without actually issuing a private message or an email. There are many instances where a visitor might want to be notified of an action, but might not want an email to be sent to their email address, or they might not want a private message for such notifications (especially if your board has limits on the number of private messages an individual can store).

Visually, when an inline notification is first triggered, it will look identical to the existing private message popup. In fact, private messages no longer directly initiate the popup you have become familiar with - instead, they issue an inline notification (which initiates this popup). This was done on purpose for consistency, and for code reduction and reuse purposes.

A "Mark Read" button has been added to the popup so that, in addition to closing or viewing the notification, you can mark it as being acknowledged without having to leave the page.

Attached Image

A new option has been added to the profile dropdown to allow users to quickly access their inline notifications, as well.

Attached Image

Administrators can control how many inline notifications a single user can store on a per-group basis. If a user is allowed to store 50 inline notifications, and notification number 51 is issued, the user's oldest notification is automatically pruned. The user will see a notification popup on the board the next time they click a link. There is also an area in the user control panel where each user can list, view and prune their notifications. Additionally, a new board index hook will show up when a user has unread notifications (and automatically disappear once all of their notifications have been acknowledged).

Attached Image

Stronger control of notifications
A new area of the ACP has been added to allow administrators to better control notifications as well. Any registered notification events will be listed, and the administrator can control which methods to use by default for each notification event, which methods cannot be used at all, and will also have the ability to disallow users from overriding the admin-defined selection. For example, an administrator might want the default notification method for new private messages to be inline notifications (show a popup on the board). Administrators may also want to disallow users from electing to get an email notification when comments are made on their profile to reduce the number of email messages sent from the server. An administrator may also want to enforce that all users (with appropriate permissions) get an email notification when content on the board is reported. All of these things, previously not possible, can be configured from one page within the ACP of IP.Board 3.1.

Attached Image

Easier user configuration options
In addition to the new UserCP page to view your inline notifications, there is a new notifications page where all notification settings and options have been consolidated. New configuration options are available to control your notification preferences, as well. Each user will be able to select whether they want to receive email, PM, or inline notifications (or a combination of the above, or none of the above) for each notification event from one page. Methods that are not available per the ACP-defined preferences are removed from the user's options, while notification events that an administrator does not allow users to override are disabled but still displayed (so that a user can know how they will be notified when one of those events occur). A couple of screenshots should help clarify this.

Attached Image

If an administrator makes the following configuration in the ACP

Attached Image

A user can expect to see the following in their notification preferences

Attached Image

You'll also note from these last 2 screenshots that we've added the ability to get notified when someone quotes a post that you made.

Easier for developers
IP.Board 3.0 has well-abstracted code to make sending private messages and emails easy for developers. While this is true, code is duplicated throughout IP.Board 3.0 that is meant to handle sending either PM or email notifications. As a general rule, duplicated code is not a good thing to have. We also had to find a way to easily implement inline notifications (without adding yet more if/else style statements everywhere that sends notifications).

We have created a new notifications class which developers can easily use to allow third-party applications to plugin to the new notifications system. This reduces the workload needed to set up notification capabilities (and management) for new applications significantly.

A developer will first need to create a plugin file for their application to define notification events. A sample plugin file might look like this

<?php

/**
 * Notification types
 */
$_NOTIFY	= array(
					array( 'key' => 'report_center', 'default' => array( 'email' ), 'disabled' => array() ),
					);

(Yes, this is the actual code for the "core" application of IPB to handle report center notifications). You define the default selections, and the options to disable by default. For example, you would not want a private message to issue a new notification by private message. This allows the developers to define the default handling of notifications for their applications.

Then, to send a notification, the following code can be used

//-----------------------------------------
// Notifications library
//-----------------------------------------

$classToLoad		= IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' );
$notifyLibrary		= new $classToLoad( $this->registry );

$notifyLibrary->setMember( $user );
$notifyLibrary->setFrom( $this->memberData );
$notifyLibrary->setNotificationKey( 'report_center' );
$notifyLibrary->setNotificationText( 'This is the text to show to the user' );
$notifyLibrary->setNotificationTitle( 'This is the title of the notification' );

try
{
	$notifyLibrary->sendNotification();
}
catch( Exception $e ){}

The most common implementation will be to use the email library to first "build" an email, and then to assign the subject as the title, and the message as the text. As you can see, however, it is quite easy to use the notifications class. The class itself will determine what the administrator has defined as being allowed and disallowed, and what the user has selected for their notification preferences, and issue all appropriate notifications automatically based on the ACP and user preference selections. You don't have to worry about ACP settings or user cp settings either, using this method. All of it is taken care for you!

Closing
Through implementing the new notification capabilities, we hope to be able to expand the notification capabilities in IP.Board easier in future versions. As you can see, we've already added one more area where a user can get notified of changes in activity, and have some ideas of other areas where we would like to have the ability to issue notifications as well. With the refactored code and easier configuration management, implementing these changes will be easy.

Also, please keep in mind that the screenshots you are seeing are very early screenshots taken of a development build. Rikki hasn't had a chance to put his magic touch on these pages, so most likely the final look and feel will be touched up a bit. We just wanted to share the new capabilities, complete with some screenshots to help you visualize them, as soon as we possibly could.

Please let us know if you have any suggestions or feedback about the new feature.

  • BomAle likes this



Wow, very nice!
    • Tomato likes this
Fantastic. This was one of my gripes with IPB for a long time.
    • ZakRhyno likes this
wow good work
    • ZakRhyno likes this
Good stuff, I'll definitely take advantage of the Notifications class. :) Interesting about the notification when someone quotes one of your posts. What happens if you receive notifications when someone responds to a topic and that response quotes one of your posts? Will you get one or two notifications?

..Al
    • ZakRhyno, eset-club.ru and Alvaro Andrés like this

You'll also note from these last 2 screenshots that we've added the ability to get notified when someone quotes a post that you made.


This, right here, is without a doubt, the greatest thing to be added to IPB since time itself. Nothing else can even come close to how amazing this particular feature is. I've been told by members, time and time again, that this is the feature they want most.

I had a similar feature installed on a vB board once, and it massively decreased response times when people were asking for help, etc because there was an easy way to see when people wanted to know something.

Anyway, THANK YOU!
Question about that quoting notification: Is this notification sent out when someone clicks (and sends a message based on) the "Reply" button in an individual post, or does it actually look to see if your post was quoted before sending the message? What happens with nested quotes in the latter case?

Thanks,

..Al
    • ZakRhyno likes this
:thumbsup:
looks great - thanks :)
how did you find the time to develop all these features? :P
Posted Image
Regarding the quoted post feature...

When someone clicks the "Reply" button on a post, the notification will be sent out. That is the trigger. If you manually quote someone else, the notification would not be issued (there's not an easy to access method of determine the post and author when stuff is just manually typed in).

With an easier to use notification system, we have ideas for other areas we can add similar notifications. Things like "You've received reputation points" and the like. Baby steps, though.
    • Yuksel and Brett B like this

When someone clicks the "Reply" button on a post, the notification will be sent out. That is the trigger. If you manually quote someone else, the notification would not be issued (there's not an easy to access method of determine the post and author when stuff is just manually typed in).

Thanks for the clarification, so really this is a notification when someone responds to one of your posts, as opposed to quoting it (because they could erase the quote text, which I often do).

With an easier to use notification system, we have ideas for other areas we can add similar notifications. Things like "You've received reputation points" and the like. Baby steps, though.

That might be going a bit overboard. ;) Perhaps a daily digest of rep points received? That would be quite useful and interesting!! I do hope some reputation system improvements make their way into 3.1. :D

..Al

With an easier to use notification system, we have ideas for other areas we can add similar notifications. Things like "You've received reputation points" and the like. Baby steps, though.

You just received a reputation point for that ;)
Really great. I've done an edit to ipb soo that if someone visit a thread (the user visiting must be registred) the board keep trace of it and than when someone reply to the thread the user will be notified. Wouldn't it be great?
Very nice. I might release a mod shortly after the 3.1 release to create a notification for status comments if this is not included by default. Any IPS Staff willing to shed a light on this?
How long until we get the Facebook task bar and inline chats?
    • krocheck and William like this
Very Nice!
Very good work so far, this notification thing reminds me of something in vb3, when a user replies to a topic, both the author and replier get notified, kinda liked that feature because I always forget about the topic i replied to, specially on a big board, you can't exactly go to the forum, without having to search through pages.

Very nice. I might release a mod shortly after the 3.1 release to create a notification for status comments if this is not included by default. Any IPS Staff willing to shed a light on this?


The following notification option for statuses are included by default:

Notify me of replies to my status updates
Notify me of replies to status updates I have replied to
Notify me when one of my friends updates their status
I think it would have been even cooler to just have notifications somewhat like Facebook...

August 2014

S M T W T F S
     12
3456789
10111213141516
171819 20 212223
24252627282930
31      

Recent Entries

Latest Visitors

  • Photo
    DoMiNiCki
    Today, 05:55 AM
  • Photo
    preziacanada
    Today, 05:09 AM
  • Photo
    Titony Sarmiento
    Today, 04:51 AM
  • Photo
    mumblerit
    Today, 04:39 AM
  • Photo
    Orbu Sorin
    Today, 04:36 AM
  • Photo
    Greenie
    Today, 04:20 AM
  • Photo
    Kai Jim Refsnes
    Today, 03:27 AM
  • Photo
    InvisionHQ
    Today, 03:09 AM
  • Photo
    daniel_r
    Today, 02:49 AM
  • Photo
    Artsrun Gasparyan
    Today, 02:47 AM

Recent Comments

Search My Blog