Notifications

Users can register for notifications on activity by their friends or in their groups. The core provides e-mail-based notifications and the messages plugin adds site-based private messaging notifications. Additional types of notifications can be added through plugins.

A plugin registers with Elgg to have notifications sent whenever one of its objects is created by a user. The registration is performed in the plugin's initialization function, as follows:

register_notification_object('object', 'blog');

A plugin can set a custom notification message by registering for the 'notify:entity:message', 'object' plugin hook.

Code location

Functions: /engine/lib/notification.php and the notifications plugin

Get Elgg 1.8 Social Networking now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.