Difference between revisions of "Notifications API"

(Implementing it in your component anyway)
Line 13: Line 13:
 
<br />
 
<br />
 
Following the tutorial explained bellow will work just fine for your extension too
 
Following the tutorial explained bellow will work just fine for your extension too
 +
 +
==The First Notification==
 +
We will assume that you're already created community type '''example''' plugin which will be triggered when user changes its profile<br/>
 +
If not, you can download '''empty example plugin''' from [http://documentation.jomsocial.com/downloads/notifications_empty_example.zip this link]

Revision as of 13:56, 1 October 2013

Overview

The built in notification system, first ever in Joomla, allows your app to keep the user (or group of users) informed about various different events. Think of notifications as important alerts that user would be interested to read and keep track of it.
Notifications can be generated everywhere. In your component or plugins and later displayed inside JomSocial notification system.
This tutorial will show you how, but since we do not have idea of any third-party component we could use :) the examples will be done on a community plugin which will be triggered at onAfterProfileUpdate event
If you don't know how to create plugin which will be triggered on this event, we suggest you to check this guide

Implementing it in your component anyway

As stated in overview of this tutorial, we will generate notifications using community plugin.
You will most likely want to create notifications inside your component, or your plugin. The following tutorial will work fin any of this cases. You only need to determine at what point in your code the notification will be created and just load the JomSocial Core Libraries file.

require_once JPATH_ROOT .'/components/com_community/libraries/core.php';


Following the tutorial explained bellow will work just fine for your extension too

The First Notification

We will assume that you're already created community type example plugin which will be triggered when user changes its profile
If not, you can download empty example plugin from this link