1
I'm creating a module and I have read the wakka section that explains how to use the notification system.
But I'm unable to make it run.
I have make the following changes to my module:
In xoops_version.php
//Notification
$modversion['hasNotification'] = 1;
$modversion['notification']['lookup_file'] = 'include/notification.inc.php';
$modversion['notification']['category'][1]['name'] = 'messages';
$modversion['notification']['category'][1]['title'] = _MI_FIRMAS_CATEGORY_NOTIFY;
$modversion['notification']['category'][1]['description'] = _MI_FIRMAS_CATEGORY_NOTIFYDSC;
$modversion['notification']['category'][1]['subscribe_from'] = 'index.php';
$modversion['notification']['category'][1]['item_name'] = 'owner_id';
$modversion['notification']['category'][1]['allow_bookmark'] = 1;
$modversion['notification']['event'][1]['name'] = 'new_message';
$modversion['notification']['event'][1]['category'] = 'global';
$modversion['notification']['event'][1]['admin_only'] = 0;
$modversion['notification']['event'][1]['title'] = _MI_FIRMAS_GLOBAL_NEW_MESSAGE_NOTIFY;
$modversion['notification']['event'][1]['caption'] = _MI_FIRMAS_GLOBAL_NEW_MESSAGE_NOTIFYCAP;
$modversion['notification']['event'][1]['description'] = _MI_FIRMAS_GLOBAL_NEW_MESSAGE_NOTIFYDSC;
$modversion['notification']['event'][1]['mail_template'] = 'global_newfile_notify';
$modversion['notification']['event'][1]['mail_subject'] = _MI_FIRMAS_GLOBAL_NEW_MESSAGE_NOTIFYSBJ;
In my post.php file
$notification_handler =& xoops_gethandler('notification');
$tags = array();
$tags['name'] = '';
$tags['url'] = '';
$notification_handler->triggerEvent('messages', $owner_id, 'new_message',$tags);
In my index template i have added:
<{include file:'db:system_notification_select.html'}>
When I go to the index y can see the notification block but it says
Bookmark this item (no notification).Why? Thank's for your time.