8
Thanks again for all the help.
I've tried with differen't users to no avail.
The notification system seems very good, but alas the module I'm trying to add it to (DMS 0.91) wasn't created to be extended easily. Great idea, but difficult to work on.
I've managed to find the notification object that should be doing something in the code block in notifications.php
foreach ($notifications as $notification) {
if (empty($omit_user_id) || $notification->getVar('not_uid') != $omit_user_id) {
// user-specific tags
//$tags['X_UNSUBSCRIBE_URL'] = 'TODO';
// TODO: don't show unsubscribe link if it is 'one-time' ??
$tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL . '/notifications.php';
$tags = array_merge ($tags, $extra_tags);
$notification->notifyUser($template_dir, $template, $subject, $tags);
var_dump($notification);
}
}
//From the var dump above
object(xoopsnotification)(6) {
["vars"]=>
array(7) {
["not_id"]=>
array(6) {
["value"]=>
string(2) "29"
["required"]=>
bool(false)
["data_type"]=>
int(3)
["maxlength"]=>
NULL
["changed"]=>
bool(false)
["options"]=>
string(0) ""
}
["not_modid"]=>
array(6) {
["value"]=>
string(2) "20"
["required"]=>
bool(false)
["data_type"]=>
int(3)
["maxlength"]=>
NULL
["changed"]=>
bool(false)
["options"]=>
string(0) ""
}
["not_category"]=>
array(6) {
["value"]=>
string(5) "event"
["required"]=>
bool(false)
["data_type"]=>
int(1)
["maxlength"]=>
int(30)
["changed"]=>
bool(false)
["options"]=>
string(0) ""
}
["not_itemid"]=>
array(6) {
["value"]=>
string(3) "188"
["required"]=>
bool(false)
["data_type"]=>
int(3)
["maxlength"]=>
NULL
["changed"]=>
bool(false)
["options"]=>
string(0) ""
}
["not_event"]=>
array(6) {
["value"]=>
string(13) "dms_file_view"
["required"]=>
bool(false)
["data_type"]=>
int(1)
["maxlength"]=>
int(30)
["changed"]=>
bool(false)
["options"]=>
string(0) ""
}
["not_uid"]=>
array(6) {
["value"]=>
string(1) "1"
["required"]=>
bool(true)
["data_type"]=>
int(3)
["maxlength"]=>
NULL
["changed"]=>
bool(false)
["options"]=>
string(0) ""
}
["not_mode"]=>
array(6) {
["value"]=>
string(1) "0"
["required"]=>
bool(false)
["data_type"]=>
int(3)
["maxlength"]=>
NULL
["changed"]=>
bool(false)
["options"]=>
string(0) ""
}
}
["cleanVars"]=>
array(0) {
}
["_isNew"]=>
bool(false)
["_isDirty"]=>
bool(false)
["_errors"]=>
array(0) {
}
["_filters"]=>
array(0) {
}
}
Now - I have found that the method of that object
$notification->notifyUser($template_dir, $template, $subject, $tags);
is returning bool(true) and according to the comments in that functions header, it returns true if the $xoopsMailer() was successful. I should get a notification message right?
Not happening with any user - Where else can I possibly look? I'm on a rope looking at a short drop and a quick stop......
FYI:
This isn't a 'post' or 'new_thread' type of triggerEvent -
It's called when a script named file_view.php is accessed
so subscribed users are notified when someone views the selected file in the document manager system. There are no errors being generated anywhere and I have debug mode for PHP on.
I think I'll give up on the DMS after today........