Difference between revisions of "Notifications API"

(Overview)
(Implementing it in your component anyway)
Line 7: Line 7:
 
===Implementing it in your component anyway===
 
===Implementing it in your component anyway===
 
As stated in overview of this tutorial, we will generate notifications using community plugin.<br/>
 
As stated in overview of this tutorial, we will generate notifications using community plugin.<br/>
You will most likely want to generate it inside your componentor your plugin. The following tutorial will work for it. You only need to determine at what point in your code the notification will be created and load the JomSocial Core Libraries file.
+
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.
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
 
require_once JPATH_ROOT .'/components/com_community/libraries/core.php';
 
require_once JPATH_ROOT .'/components/com_community/libraries/core.php';
 
</syntaxhighlight>
 
</syntaxhighlight>
 
<br />
 
<br />
 +
Following the tutorial explained bellow will work just fine for your extension too

Revision as of 13:48, 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