XOOPS  2.6.0
NotificationsPluginInterface Interface Reference

Public Member Functions

 categories ()
 
 events ()
 
 item ($category, $itemId)
 
 tags ($category, $item_id, $event)
 

Detailed Description

Author
trabis lusop.nosp@m.oema.nosp@m.s@gma.nosp@m.il.c.nosp@m.om
Version
$Id$

Definition at line 19 of file interface.php.

Member Function Documentation

NotificationsPluginInterface::categories ( )

Expects array of arrays containing:

'name' => 'thread'; 'title' => _MI_NEWBB_THREAD_NOTIFY; 'description' => _MI_NEWBB_THREAD_NOTIFYDSC; 'subscribe_from' => 'viewtopic.php'; 'item_name' => 'topic_id'; 'allow_bookmark' => 1;

name: the name of the category title: the title of the category (use language strings) description: a description of the category (use language strings) subscribe_from: an array of all scripts where user is permitted to subscribe(Use '*' for all scripts. Omit this line for no scripts. Note: you would specify no scripts only if your module provides other ways for users to subscribe, e.g. custom checkboxes within forms.) item_name: the HTTP //get// parameter to watch, which specifies the ID of the specific item in the category (e.g. forum ID or thread ID). If set, the //get// parameter must be submitted via HTTP call, otherwise, the notification categories remain hidden. allow_bookmark: set to 1 if you want the system to allow this item to be bookmarked by users

Returns
array
NotificationsPluginInterface::events ( )

Expects array of arrays containing:

'name' => 'new_post'; 'category' => 'thread'; 'title' => _MI_NEWBB_THREAD_NEWPOST_NOTIFY; 'caption' => _MI_NEWBB_THREAD_NEWPOST_NOTIFYCAP; 'description' => _MI_NEWBB_THREAD_NEWPOST_NOTIFYDSC; 'mail_template' => 'thread_newpost_notify'; 'mail_subject' => _MI_NEWBB_THREAD_NEWPOST_NOTIFYSBJ;

name: the name of the event category: the category of the event title: title of event (use language strings) caption: description in form "Notify me when..." (use language strings) description: description of event (use language strings) mail_template: mail template in ##language/<language>/mail_template## directory of module (omit the '.tpl' suffix) mail_subject: subject of email (use language strings)

The following are optional: admin_only: set to 1 if you wish the event to be visible only to module administrators invisible: set to 1 if you wish the event to be invisible... i.e. won't show up in module preferences or in notification blocks. It is used for 'custom' notifications: e.g. in 'mylinks', you can sign up (on the submit form) for a one-time notification when your link submission is approved. The 'approve' event is invisible.

Returns
array
NotificationsPluginInterface::item (   $category,
  $itemId 
)
Parameters
string$category
int$itemIdexpects an array containing: name, Name of the Item url, Url of the Item
Returns
array
NotificationsPluginInterface::tags (   $category,
  $item_id,
  $event 
)

Expects array containing tags to use in mail template

ex: return array('X_SOME_NEW_TAG' => 'Some New Content'); note: Using tags is optional, you can return an empty array if you like

Parameters
string$category
int$item_id
string$event
Returns
mixed

The documentation for this interface was generated from the following file: