Force digest notifications for users

Author Message

Nathan Kelly

Thursday 24 November 2005 5:37:05 pm

Hi all, I have set up notifications for my registered users and I've found that every time I make a change or add multiple files to a node that the user wants notification for he/she will receive an email for every change/addition made.

This is great, it works, but if I was to add 30 files my user would start to get a little cranky with all of the emails he/she was receiving.

This means the user should set his/her notification settings up for digest mode, the problem is I'm expecting that a lot of the users for this particular site may not realise they can set this preference or may be too lazy to do so.

So the question is, is there any way to force digest mode for notifications, with a preset time and consistency so that the lazy users don't have to set it them selves?

Keeping in mind I would still like users to be able to change their preferences.

Any suggestions welcome.

Cheers!

Pardon me while I burst into flames...

Nathan Kelly

Thursday 01 December 2005 3:10:13 pm

Has anyone got any ideas on this; I just uploaded approx 60 files to a node for which I have set a test notification.

As I expected my inbox was flooded with about 40 notifications, what happened to the other 20 odd messages? Well I had to call my ISP to ask them to unblock the spam filter as the flood caused the filter to treat these messages as spam...

I really need a solution to this, is there any way to put all of these notifications into one message by default?

Please, any help is very appreciated.

Cheers!

Pardon me while I burst into flames...

Nathan Kelly

Monday 19 December 2005 3:39:04 pm

Sorry to bump this but this is still an issue I haven't managed to resolve, surely someone knows how this can be done?

Cheers!

Pardon me while I burst into flames...

Bruce Morrison

Monday 19 December 2005 7:49:42 pm

Hi Nathan

I've had a real quick look at this and am not able to give you an answer. I can tell you where to look....and hopfully give you some pointers as how to work these things out.

The digest setting is set in the admin section at (My Account -> My Notification Settings) notification/settings. This form is processed by kernel/notification/settings.php which seems to cycle through all the notification handlers making changes by calling $handler->storeSettings( $http, $Module );

Notification handlers are in kernel/classes/notification/handler , the digest one in kernel/classes/notification/handler/ezgeneraldigest/ezgeneraldigesthandler.php

So if you look into the storeSettings method you should be able to work out what you need to do to set digest notifications for users.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Nathan Kelly

Monday 19 December 2005 9:22:48 pm

Hi Bruce thanks for the ideas, I'll look into it and see what I can come up with.

[update]
Ok I looked... wow there's some PHP in there... Unfortunately I'm not to good with that stuff. I noticed the kernel/notification/settings looks for $availableHandlers, I assume it gets these from notification.ini. If i was to override notification.ini with notification.ini.append.php would it be wise to set it so that only ezgeneraldigest is available? Or would this cause other headaches within the system?

For the traffic this site will attract I don't think anyone will need the standard notification (the one that sends emails for every change), but would removing it from available notification types disable it?
[update]

Cheers!

Pardon me while I burst into flames...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.