Joomla is extended by thousands of extensions and each of them manage various notifications to users in their own way. This means that there is no easy way for a Site Administrator to manage notifications centrally. It also means that 'end users' have no way to manage these centrally . This proposal aims to set a standard way to declare notifications and handle them in a unified way without loosing any of the flexibility that extension developers want in designing their notifications. 

The Inspiration

EasySocial/JomSocial currently do this for their own notifications in a pretty nice way. Here's and example screenshot from EasySocial. 

EasySocial Notifications

These however need to be made more global and more extensible. This is a great example of where an 'Open Source Spirit' approach would have given Joomla these features in the core instead of having the 4-5 versions we see today in various extensions. I'm guessing this path would have been harder but more enriching to the community. 

While discussing a similar need for various Techjoomla extensions, we decided that we will do this with the Open Source Spirit and make it a goal to make it a PR for Joomla. Initially we will plan to build and test it for 5-6 varied extensions of our own and test it in a real world use case. Next we will ask more developers to come on board. A parallel PR will be maintained for the overall community to vote on and try that it gets into the core. 

Supported Notification delivery methods

Considering the current needs, the following delivery methods should be supported by default in the Joomla core. 

  1. Email
  2. SMS (Text Messaging)
  3. Push Updates
  4. Internal Notifications 

Reducing Coding Effort for Extension Developers

With a global system in place, it should become very easy for extension developers to setup a variety of configurable notifications for their extensions with simply a declaration of the notification and a few lines of standard reusable code in their extension. Something like SendNotification($uniquecode, $context, $types,$from, $to) . This function of course needs to be thought out better to decide what all variables should it support. 

Notification Declaration 

Joomla needs to give a standard way to extension developers to declare all the notifications that they support via a xml file or something similar. Joomla will parse these to give a centralized configuration panel to these. This will also have the standard texts for each type of notification. These will also be multilingual friendly. 

Override with Configurations 

Another requirement from system integrators is that they want to modify the text for the various notifications. This should be possible via admin configurations where the admin can not only control which notifications to enable and disable along with what methods to use but also modify the text. We can also allow the admin to choose which of the notifications the users can have control on. 

A key here might be allow 'Overrides' on various levels. In a general use case for most extensions something like below could work.

Global -> Overridden by Category > Overridden by Item 

However in some of Techjoomla's extensions like Quick2Cart, we have Multi vendor and Multi Store support. In this case, the overrides need to work like 

Global -> Overridden by Category > Overridden by User(Vendor/Owner) > Overridden by Store > Overridden by Item 

This is an area i'm struggling to figure out a solution for that's flexible enough to support such custom depths. 

User Control on Notifications

In addition to the admin controlling notifications, end users can also override and subscribe to what notifications they want to receive via a configuration interface. 

Admin and user interface to show 'Local' Push notifications

A nice interface to display notifications with a count. The screenshot is borrowed from the EasySocial demo. 

Feedback

I know this is a high level idea right now, I will develop it further with more screenshots and high level code organisation ideas in the coming weeks. But what do you think of the concept ? Do comment and let me know !