How to set notifications for new users

hallman's picture

I'm trying to switch from the notify module to notifications. I would like new users to have as default settings to receive notifications of creation, update, and comments for content types events, forums, and book pages (I call book pages "resource items"). I don't see a way to do this. New users don't have any subscriptions. They have to set each one.

With the notify module, in notify.module, there's code for inserting a new user and I've been able to modify it to:

at case 'insert':
      if (isset($edit['notify_decision']) && $edit['notify_decision'] == 1){
$t) VALUES (%d, %d, %d, %d, %d)', $user->uid, 1, 1, 0, 1);

The notify table looks like:

+-----+--------+------+---------+----------+---------+
| uid | status | node | comment | attempts | teasers |
+-----+--------+------+---------+----------+---------+
|   1 |      1 |    1 |       1 |        0 |       1 |
|   3 |      1 |    1 |       1 |        0 |       1 |

The code for notifications is more complicated. How can I find where to set values for new users? I don't know php or mysql, but I can copy and paste things pretty well without knowing exactly what I'm doing. I found the notify module changes in posts from other users who want defaults for new users. I haven't found similar posts yet for the notifications module.

The notify module is still supported so I can still use it. But I need notifications for Organic Group notifications and I'd rather use it for all notications rather than use both modules.

Groups:
Login to post comments

Oh....!

hallman's picture
hallman - Mon, 2009-10-26 16:54

A few days ago, I tried notifications_extra, which includes "Custom Subscriptions Allows creating predefined subscriptions and assigning them to users," and couldn't figure out how to set up custom subscriptions. I'm making progress with that today. There may be a better way to do this though. This module is very new and doesn't have much usage yet.

Judy Hallman


Notifications

JuliaKM's picture
JuliaKM - Mon, 2009-10-26 17:50

Hi Judy,

Do you have content notifications, notifications, and notifications UI enabled or are you using something else?

Julia


Yes

hallman's picture
hallman - Mon, 2009-10-26 18:25

Yes, those three plus notifications autosubscribe, notifications lite (required by organic group notifications), and notification views (I haven't looked yet to see what it does).

I've added notifications_extra which has Custom subscriptions and was finally able to create a subscription for new users for events, forums, and resource items. (I'm not good at adding fields to views and that's what I needed to do.) Still testing, but so far it looks good.

Judy Hallman


Cool!

JuliaKM's picture
JuliaKM - Tue, 2009-10-27 13:42

I had no idea that there even is a notifications autosubscribe function. Very cool! I was thinking of writing a block that could be placed anywhere on a site and show the optional notifications. Right now, you can just have the block on your node pages.

Did you happen to find something like this that already exists?

Julia


There's an overwhelming number of options

hallman's picture
hallman - Tue, 2009-10-27 19:28

I'm amazed at the permutations and combinations of things you can do with notifications. I'm not sure I've got things totally set up right yet, but I like what I see. I think what you're looking for is on admin/messaging/notifications/ui at the bottom:

Global settings:
In node form. A subscriptions subform will be available when creating or editing nodes.
In comment form. A subscriptions subform will be available when posting comments.
Full node links. Subscription links will be displayed for full node pages.
Teaser node links. Subscription links will be displayed for node teasers.
Form on node pages. A collapsible subscriptions form will be displayed for full node pages.
In block. Options will be displayed on the Subscriptions block when viewing a node.

Your userid is an administrator on my test site so you can look around there. Take a look at
http://test.nccommunities.org/admin/messaging/notifications

Judy Hallman