XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
notification_functions.php File Reference

Go to the source code of this file.

Namespaces

namespace  kernel
 

Functions

notificationCategoryInfo ($category_name= '', $module_id=null)
 
notificationCommentCategoryInfo ($module_id=null)
 
 notificationEnabled ($style, $module_id=null)
 
 notificationEventEnabled (&$category, &$event, &$module)
 
notificationEventInfo ($category_name, $event_name, $module_id=null)
 
notificationEvents ($category_name, $enabled_only, $module_id=null)
 
 notificationGenerateConfig (&$category, &$event, $type)
 
notificationSubscribableCategoryInfo ($module_id=null)
 

Function Documentation

& notificationCategoryInfo (   $category_name = '',
  $module_id = null 
)

Get an associative array of info for a particular notification category in the selected module. If no category is selected, return an array of info for all categories.

Parameters
string$nameCategory name (default all categories)
int$module_idID of the module (default current module)
Returns
mixed

Definition at line 74 of file notification_functions.php.

References $module, $module_handler, $module_id, $ret, $xoopsModule, and xoops_gethandler().

Referenced by notificationCommentCategoryInfo(), notificationEvents(), notificationSubscribableCategoryInfo(), XoopsNotificationHandler\triggerEvent(), and xoops_module_install().

Here is the call graph for this function:

Here is the caller graph for this function:

& notificationCommentCategoryInfo (   $module_id = null)

Get associative array of info for the category to which comment events belong.

Todo:
This could be more efficient... maybe specify in $modversion['comments'] the notification category. This would also serve as a way to enable notification of comments, and also remove the restriction that all notification categories must have unique item_name. (TODO)
Parameters
int$module_idID of the module (default current module)
Returns
mixed Associative array of category info

Definition at line 110 of file notification_functions.php.

References $module_id, $ret, notificationCategoryInfo(), and notificationEvents().

Here is the call graph for this function:

notificationEnabled (   $style,
  $module_id = null 
)

Determine if notification is enabled for the selected module.

Parameters
string$styleSubscription style: 'block' or 'inline'
int$module_idID of the module (default current module)
Returns
bool

Definition at line 34 of file notification_functions.php.

References $config, $config_handler, $GLOBALS, $module, $module_handler, $module_id, $status, xoops_gethandler(), XOOPS_NOTIFICATION_ENABLEBLOCK, XOOPS_NOTIFICATION_ENABLEBOTH, and XOOPS_NOTIFICATION_ENABLEINLINE.

Referenced by b_system_notification_show().

Here is the call graph for this function:

Here is the caller graph for this function:

notificationEventEnabled ( $category,
$event,
$module 
)

Determine whether a particular notification event is enabled. Depends on module config options.

Todo:
Check that this works correctly for comment and other events which depend on additional config options...
Parameters
array$categoryCategory info array
array$eventEvent info array
object$moduleModule
Returns
bool

Definition at line 294 of file notification_functions.php.

References $config_handler, $module, $notification_handler, notificationGenerateConfig(), and xoops_gethandler().

Referenced by notificationEvents().

Here is the call graph for this function:

Here is the caller graph for this function:

& notificationEventInfo (   $category_name,
  $event_name,
  $module_id = null 
)

Get associative array of info for the selected event in the selected category (for the selected module).

Parameters
string$category_nameNotification category
string$event_nameNotification event
int$module_idID of the module (default current module)
Returns
mixed

Definition at line 318 of file notification_functions.php.

References $module_id, $ret, and notificationEvents().

Referenced by XoopsNotificationHandler\triggerEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

& notificationEvents (   $category_name,
  $enabled_only,
  $module_id = null 
)

Get an array of info for all events (each event has associative array) in the selected category of the selected module.

Parameters
string$category_nameCategory name
bool$enabled_onlyIf true, return only enabled events
int$module_idID of the module (default current module)
Returns
mixed

Definition at line 142 of file notification_functions.php.

References $config_handler, $dir, $GLOBALS, $module, $module_handler, $module_id, $xoopsConfig, $xoopsModule, _NOT_BOOKMARK_NOTIFY, _NOT_BOOKMARK_NOTIFYCAP, _NOT_BOOKMARK_NOTIFYDSC, _NOT_COMMENT_NOTIFY, _NOT_COMMENT_NOTIFYCAP, _NOT_COMMENT_NOTIFYDSC, _NOT_COMMENT_NOTIFYSBJ, _NOT_COMMENTSUBMIT_NOTIFY, _NOT_COMMENTSUBMIT_NOTIFYCAP, _NOT_COMMENTSUBMIT_NOTIFYDSC, _NOT_COMMENTSUBMIT_NOTIFYSBJ, notificationCategoryInfo(), notificationEventEnabled(), XOOPS_COMMENT_APPROVEADMIN, XOOPS_COMMENT_APPROVEALL, XOOPS_COMMENT_APPROVENONE, XOOPS_COMMENT_APPROVEUSER, xoops_gethandler(), and xoops_loadLanguage().

Referenced by b_system_notification_show(), notificationCommentCategoryInfo(), notificationEventInfo(), and xoops_module_install().

Here is the call graph for this function:

Here is the caller graph for this function:

notificationGenerateConfig ( $category,
$event,
  $type 
)

Generate module config info for a particular category, event pair. The selectable config options are given names depending on the category and event names, and the text depends on the category and event titles. These are pieced together in this function in case we wish to alter the syntax.

Parameters
array$categoryArray of category info
array$eventArray of event info
string$typeThe particular name to generate return string

Definition at line 394 of file notification_functions.php.

References $type.

Referenced by notificationEventEnabled(), and XoopsNotificationHandler\triggerEvent().

Here is the caller graph for this function:

& notificationSubscribableCategoryInfo (   $module_id = null)

Get an array of associative info arrays for subscribable categories for the selected module.

Parameters
int$module_idID of the module
Returns
mixed

Definition at line 338 of file notification_functions.php.

References $_GET, $_SERVER, $module_id, and notificationCategoryInfo().

Referenced by b_system_notification_show().

Here is the call graph for this function:

Here is the caller graph for this function: