
I've never used this so can't be sure how well it'll work.
else {
// Otherwise, check previous subscribed status...
$notification_handler =& xoops_gethandler('notification');
if (!empty($topic_id) && !$notification_handler->isSubscribed('thread', $topic_id, 'new_post', $xoopsModule->getVar('mid'), $xoopsUser->getVar('uid'))) {
$notify = 0;
}
else {
$notify = 1;
}
}
$subjectStart = $event_info['mail_subject'];
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);
$subject = $subjectStart." : ".$tags['POST_NAME'];
$notification->notifyUser($template_dir, $template, $subject, $tags);
}