1
marook
Enable Notification to Self?
  • 2005/10/17 19:25

  • marook

  • Friend of XOOPS

  • Posts: 89

  • Since: 2002/9/9 1


I all,

I would like to make a patch to XOOPS 2.2+ (.3RC1 running), so the user or admin can set if the poster should receive own notifications. In particular, for the Forum.

So, questions.

1: Where does XOOPS Notification determine if the notification is about to go to the 'generator' of the event?

2: Would it be possible to add this as a pr. User option? (I guess so, just needs work...)

3: If 2 is Yes, would it be possible to even determine if it should only happen in special modules (like the forum)? (I guess so, just needs work... right?)

So, I guess if someone can point me in the right direction for question 1, I just need to do some hard work.. right?
Marook,

Want to go on a Safari with me?
(Yes, it is me in that avatar.. )

2
Herko
Re: Enable Notification to Self?
  • 2005/10/17 19:45

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


you mean get notifications even when you post yourself? Doesn't that defeat the point of notifications in the first place?

Herko

3
marook
Re: Enable Notification to Self?
  • 2005/10/17 19:53

  • marook

  • Friend of XOOPS

  • Posts: 89

  • Since: 2002/9/9 1


Well, the point is, I'm working on doing a 'listserver' function for the Forum (CBB) and it would be nice to be able to get your own posts in email copy.

So, maybe the question should be:

How do I hack/patch XOOPS so a Notification Type can send-to-self if the user wants too?

The other big issue, of cource, is to get emails into CBB, but that's a different thread...
Marook,

Want to go on a Safari with me?
(Yes, it is me in that avatar.. )

4
marook
Re: Enable Notification to Self?
  • 2005/10/17 19:58

  • marook

  • Friend of XOOPS

  • Posts: 89

  • Since: 2002/9/9 1


On a related mindset, it might be a nice option to enable some notifications to Force email delivery to the user... ?!? no matter the prefered delivery option set in the User Account...
Marook,

Want to go on a Safari with me?
(Yes, it is me in that avatar.. )

5
Herko
Re: Enable Notification to Self?
  • 2005/10/17 19:59

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


there's probably a filter there somewhere that excludes the notification being sent to the uid of the poster. That's where you'll need to put your preference I guess...

Herko (not a core dev, sorry can't help you much more)

6
marook
Re: Enable Notification to Self?
  • 2005/10/17 20:22

  • marook

  • Friend of XOOPS

  • Posts: 89

  • Since: 2002/9/9 1


Yeah.. looking in /kernel/notification.php, I find this:

function triggerEvent
    
...
        if (!isset(
$omit_user_id)) {
            global 
$xoopsUser;
            if (!empty(
$xoopsUser)) {
                
$omit_user_id $xoopsUser->getVar('uid');
            } else {
                
$omit_user_id 0;
            }
        }


Guess I need to handle this in the " if (!empty($xoopsUser)) " part, or make a CASE looking at the preference set on the user/notification.

If I add a special notification event to a module, could I simply add another param to the notification, like:

$modversion['notification']['event'][n]['notify_self'] = 1;

and check for this somehow?

I guess this could set the $omit_user_id and the poster would get the notification?
Marook,

Want to go on a Safari with me?
(Yes, it is me in that avatar.. )

Login

Who's Online

64 user(s) are online (34 user(s) are browsing Support Forums)


Members: 0


Guests: 64


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits