PEAK XOOPS - NotificationHandler for D3 modules in englishin japanese

Archive | RSS |
XOOPS
XOOPS : NotificationHandler for D3 modules
Poster : GIJOE on 2008-09-06 06:02:40 (8885 reads)

in englishin japanese
We know D3 modules have a difficulty about Notification.

The NotificationHandler of X2 read the mail template only from
ROOT/modules/(dirname)/language/(lang)/mail_template/(mail_template).tpl
If there are no appropriate file, the event will be ignored.

We have to make custom function named (foo)_trigger_event like d3forum or pico.
This is not a good idea.

Then, I've writtein a common method to notify them from D3 modules, into altsys.

How to use:
Just change the code from


$notification_handler =& xoops_gethandler( 'notification' ) ;
$notification_handler->triggerEvent($category, $item_id, $event, $extra_tags, $user_list, $module_id, $omit_user_id);

to

require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3NotificationHandler.class.php' ;
$notification_handler =& D3NotificationHandler::getInstance();
$notification_handler->triggerEvent($mydirname, $mytrustdirname, $category, $item_id, $event, $extra_tags, $user_list, $omit_user_id);


This code can work with X2, XCL2.1, ImpressCMS, and perhaps XOOPS 2.3 from xoops.org

Perhaps, almost all D3 modules use the handler.
This means that altsys >= 0.61 is required.

Appendix:
This D3NotificationHandler searches the "mail_template" from following paths.

ROOT/modules/(mydirname)/language/$language/mail_template/
TRUST/modules/(mydirname)/language/$language/mail_template/
ROOT/modules/(mydirname)/language/english/mail_template/
TRUST/modules/(mydirname)/language/english/mail_template/

0 comments

Related articles
Printer friendly page Send this story to a friend

Comments list

Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!