I guess a default notification scheme would be nice.
This default scheme would be nice for setting notifications for new users. Each time a user would make an account, he will get these default notification schema. In this way, site administrator would not be required to browse every single user to set up his notifications.
And about "update options" selectbox in administration->user management->users, i guess it would be nice to have some notification options embedded there. In this way, administrators could mass modify notifications of selected users. I don't know what notification option would go there in selectbox, but the only thing that crosses my mind is a "apply default notification settings to selected users" option.
What do you say?
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | notify_123504_0.patch | 12.76 KB | stella |
| #13 | notify_install_123504.patch | 1.47 KB | stella |
| #12 | notify_123504.patch | 13.01 KB | stella |
| #11 | notify_default.sql_.txt | 65 bytes | mandclu |
| #10 | notify_11.patch | 8.9 KB | mandclu |
Comments
Comment #1
Capnj commentedI second the request for some default actions with Notify. I would like to be able to turn that on by default.
Comment #2
mandclu commentedI'd also like this feature. In fact, I'd prefer if the end user just has a single user on whether or not to receive updates, and the admin can configure what will be included.
Comment #3
mandclu commentedOK, here's a patch I did up that adds an ability to set the default master switch and configuration options.
It also splits off the configuration options into a separate permission, so those who want users to configure that stuff can allow them to, but those would would prefer to make it simple for the end user can leave permissions for that off.
I also added a master switch to the registration form, which follows the site default.
Comment #4
mandclu commentedWhoops, needed to add processing for the registration preference. This one should be better.
Comment #5
mishhh commentedGreat!
It works like a charm...
Many thanks from my part:)
There can be many improvements to this module... I love it...
Comment #6
stella commentedI encountered a few problems with this patch, see below. I've tried to be as detailed as possible and have suggested solutions for the critical problems. Let me know if you have any questions.
Critical:
Major:
Minor:
variable_get('notify_default_node', t('Enabled'))in $form['notify_page_detailed']['notify_default_node'].Even with the above problems, it's a good addition to the notify module and assuming you can fix these few issues, I'd be willing to set it to 'patch (ready to be committed)'.
Cheers,
Stella
Comment #7
mandclu commentedHere's a new patch that should address the critical issues.
I will definitely work on the others, thanks for identifying them. I actually caught one more, feel free to offer your thoughts on how best to resolve it.
When you go to the page to manage notifications (/admin/user/user/notify) it lists all the condiguration options for every user. If, for example, you just wanted to flush the e-mail queue, you would also be creating settings for all listed users.
My goal was to keep all users who hadn't explicitly set preferences to use the site default configuration. That is, if you change the default, they automatically use the new default.
One option I considered was adding a new column, default_config, that, if set, would explicitly tell the notify module to use the site default. I'm a bit leary of making a database change, however.
Any thoughts?
Martin
Comment #8
stella commentedWell spotted! I think the new column in the database table is the way to go. Otherwise you're going to have to do some complex coding which may be difficult to maintain. It will fix this issue and one of the other ones I found I think. You'll probably need to add a 'use default' column in the user listing for mass user changes though.
So +1 on adding a new column.
I haven't looked at your new patch in detail yet, will have more time to do so tomorrow, but at a first glance I think you're still using 'status' on the registration form, instead of e.g. 'notify_status'. 'status' is a reserved field in the drupal version (5.2 dev) I'm using.
I'll take a more detailed look tomorrow. Gotta go.
Cheers,
Stella
Comment #9
mandclu commentedWhoops, looks like I patched to the wrong file. You may as well sit titght on this patch and let me do up a new one that incorporates the new column and some of the other issues.
Comment #10
mandclu commentedOK, I was feeling ambitious so I decided to take another crack at this. The attached should address everything except the t('Enabled') observation. My feeling on that one is that it is required, since it must match the values in the options array.
This new version uses a new field, as discussed previously. A database update will be posted immediately following this.
Comment #11
mandclu commentedSQL file for database update
Comment #12
stella commentedHi,
I've attached my own version of the patch, with a few changes/fixes.
I think it's all working now, you should give it another go.
Cheers,
Stella
Comment #13
stella commentedPatch attached for the notify.install file to add the 'use_default' column to the 'notify' table - supports both mysql and pgsql.
Stella
Comment #14
mandclu commentedThanks for the quick work! I'd like to try your patch, but I keep getting this error:
patch: **** malformed patch at line 53:
Any thoughts on what might be the cause of the problem? I've tried resaving the patch with different line endings and encodings, but no luck as yet. Any thoughts?
Comment #15
stella commentedHow are you applying the patch? Is that line 53 of notify_123504.patch? If so that's just a blank line and can be ignored.
Comment #16
mandclu commentedHere the command I used:
patch -p0 < notify_123504.patch
I did try deleting the line, but then I got:
patch: **** malformed patch at line 53: @@ -74,6 +117,73 @@
Was the patch made in unified format? If I set the flag to force unified format, I also get this error:
missing header for unified diff at line 3 of patch
Comment #17
stella commentedI'm not sure what the problem is. I created the patch with "cvs diff -u notify.module > notify_123504.patch". I've regenerated it and attached it again to see if it helps.
Comment #18
mandclu commentedThanks for your persistance (and once again for your help). That version worked for me.
Comment #19
stella commentedComment #20
Beetle B. commentedHate to say this, but the patch isn't working for me.
I created the relevant field in the notifications table, and get the options to toggle the Master settings, but new users are still set to disabled...
Comment #21
beginner commenteduser above says the patch is not working.
Also, see the coding standards: http://drupal.org/coding-standards
Comment #22
gurukripa commentedcan we have a way to ensure that all users can be made to subscribe to notify by default...once..and then also for new users...
then people can turn it off as they wish..
thanks..
someone pls help on this for Drupal 5.1
Comment #23
gisleDuplicate of http://drupal.org/node/92206.