I was wondering what Jose and others had in mind for the future development of the custom subscriptions module. Specifically, I am wondering whether you view it as a sort of meta-subscription or "container" for subscriptions, or whether you view it as a separate subscription type on par with content, tag, and author subscriptions. Currently, the module seems to be much more like the latter (for example, if you are subscribed to content or tags via a custom subscription, you do not appear to be subscribed to them on the content and tag subscription pages). However, I think it would be much more useful as a sort of container for subscriptions. By abstracting and encapsulating individual subscription types, I think it would make it much easier to develop other add-on packages.
For example, I want new users to be automatically subscribed to certain types of content. This functionality exists in custom subscriptions already, but I think it's confusing as it stands for the reason I mentioned above - a user may be subscribed to content via a custom subscription but this won't be reflected in their content subscriptions page. Thus, if custom subscriptions continues in its current state, I'll have to write a separate module to auto-subscribe new users, and I'll have to code up the ability to create "subscription packages" for different user roles, very nearly duplicating the functionality of this module. With just a little nudge I think it could fill this (and other) roles nicely.
Comments
Comment #1
David Goode commentedI'm wondering whether the problem is on the custom subscriptions level or the other administration levels that treat certain semi-arbitrary "subscription types" specially. Custom subscriptions can overlap exactly with the fields of predefined sub types, but they also can include other combinations, and I don't think we want to forgo or marginalize the flexibility of this latter use case.
On the other hand, I think particularly the user subscription admin pages could use some rethinking, because 1) they are provided largely independently by each module, creating overlapping, only semi-standardized code and UI, and 2) notifications itself has all the information it really needs to create an automatic listing, probably with a view filtered by subscription fields. Notifications_views is already in distribution, and if we added some more functionality along these lines to it we might be able to implement this, in which case all you'd have to do is either use the default view or override it to list certain custom subscriptions in the same way as standard nodetype ones if they shared fields. Ideally, by default the actual "subscription type" would become trivialized in favor of field-based filtering on the UI. Does that sound reasonable? I'm not actually very familiar with the autosubscribing portions of notifications_custom, so maybe I'm missing something in that regard.
David
Comment #2
danepowell commentedOkay, sorry it's taken me a while to get back on this, I've been trying to hit some deadlines elsewhere. I think I understand what you are saying - I am still getting familiar with the Notifications structure, but it looks like there are two tables that store user subscription data, notifications and notifications_fields. In notifications, custom subscriptions does act like a separate subscription type (type: custom_whatever). In notifications_fields, however, you see exactly what's contained in the custom subscription.
You are saying we should simply have a view that enumerates the rows of notifications_fields that apply to a user at user/1/notifications/list or something, instead of having separate pages at user/1/notifications/taxonomy, etc...? Sort of similar to the admin view at admin/messaging/subscriptions/admin, but we would more intelligently combine notifications and notifications_fields information so that users see not just their custom subscriptions but the individual components of those subscriptions? If so I think this sounds like a great idea!
Comment #3
realrudymartin commentedNot sure where this feature goes - but it can be confusing to a user that subscribes to the site to see another area called manage subscriptions.
Question: Is there a way to rename the user interface titles, similar to the way block and menu titles can be changed?
Changing it to notifications/alerts is OK with me but someone else may have a problem with those terms.
By the way this is the same issues with the simplenes module that also calls uses "subscriptions" and "newsletters" in the titles used in the my account center.
Any help appreciated.
iwebconsultant@yahoo.com
Comment #4
danepowell commentedI guess this is the heart of my question: will we treat custom subscriptions like "shrink-wrap" or like persistent collections?
By a "shrink-wrap" approach, I mean that we treat custom subscriptions as an easy way of "selling" a bunch of subscriptions to a user at once, but those subscriptions aren't meant to stay bundled - when a user subscribes to a custom subscription, they are really just subscribing to all of its individual components at once.
The alternative is that a set of custom subscriptions are meant to stay bundled over time. There are some questions to consider with this approach: if a user unsubscribes from a component of a custom subscription, should they still be considered to be subscribed to the custom subscription? Conversely, if an admin adds or removes components to/from a custom subscription after users have already subscribed to it, should those users' subscriptions be updated to reflect the changes? How do we deal with one component being part of multiple custom subscriptions - i.e., how do we associate the component with both custom subscriptions without the user being subscribed to it twice?
The current implementation seems to be something of a mix of these two, which is why I was a little confused and think that we should pick a direction and stick to it. Obviously, the latter alternative raises a lot more questions and is going be harder to implement and less intuitive for end-users. I also don't see much marginal utility in it over the "shrink-wrap" approach. Thus, I think we should go with the "shrink-wrap" approach, but I am happy to hear other arguments.
Comment #5
jose reyero commentedYes, I have to agree this is a bit of a mixed feature, and still experimental, actually that's the reason why this is not in the main Notifications package yet.
About bundling several subscriptions, it sounds like a good idea, though it is a different feature. The idea I have in mind for the whole subscriptions stack is something like this:
- Modules define subscription types (notifications_content, notifications_custom, etc...). Though there may be some overlap here, we don't really want to push the complexity of the custom subscriptions for everybody to use, so the modules providing simpler subscription types (content type, tag). Maybe the breakthrough feature here would be being able to export such custom subscriptions and paste them in your module, using some views like approach.
- Bundling several subscription types into one would be a nice feature too, creating something like 'meta subscriptions', though I'm afraid this would push the complexity of the module maybe a bit too far. It needs some good UI too, so maybe this is better as a separate module for now.
- Then, making subscriptions available for user registering, optional or not, or mass applying that subscriptions to a group or users, which are currently implemented in notifications_custom doesn't actually belong here it should be a different layer, so we can apply these settings to subscriptions defined by other modules too.
- About the UI, agreed it should be handled by the framework itself. However this needs some more data (per subscription type) to define whether it should be available, visible and editable and for which roles.
So I think the way to move forward here is to merge custom subscriptions and all other subscriptions in a table which defines all the other things (user register, visible, editable). This would be a 'views like' approach on which some modules define predefined subscriptions that are stored on the table, and the 'notifications_custom' module is kind of a 'views_ui', which lets you edit/create all the other subscriptions.
Btw, the data model (notifications, fields) is documented here, http://drupal.org/node/312427
Comment #6
danepowell commentedAhah... it would seem that I have completely misunderstood the purpose of Custom Subscriptions, which (correct me if I'm wrong) is basically to send notifications based on a combination of conditions rather than a single condition. What I'm talking about here with bundling is indeed an entirely different feature (although if you think of CS currently combining fields with AND, bundling would just be combining them with OR, so it's not that far off). I'll take a bit of time to reconsider all of this now that I think I understand the purpose of the module a little better :)
I'm mostly excited about this module because of its features like being visible on user registration forms and automatically subscribing new users, which aren't available with the other subscription types. Maybe we should think about porting these features to the other modules, or building them into the framework so that they are available for any subscription type.
Comment #7
jose reyero commentedYeah, it seems we were talking different things here. Just to make it clearer:
Subscription type === n (AND) subscription conditions (node type = x, tag = y, author = z.....)
Custom Subscriptions is used to build new of such Subscription Types (you select the conditions)
Bundling subscription types, the way I think of it, would be combining two or more Subscription types in a new one (OR), with only practical UI consequences (admin/user subscribes/unsubscribes to both things with a single click)
An example:
- Type1 is 'news' content posted by admin (2 AND conditions)
- Type2 is any content tagged with 'urgent' (1 condition)
- Type3 could bundle both (Type1 + Type2) and be named like "Subscribe to important posts" (1 option in the UI that would create 2 subscriptions in the backend though).
However, you could also think of bundling subscription types as creating a new one that just adds up all the conditions of each, that would be AND. And that makes sense too, though it could be implemented just as an admin UI artifact.... (select the conditions of this and this other type and add them together).
Another interesting feature would be to create subscription types with 'OR' conditions, and I think simpler ones could be easily implemented in notifications_custom. If you look at the data model, the notifications (one row per subscription) has a 'conditions' field (= number of subscriptions that must match for notifications to be triggered) so it wouldn't be too difficult creating a subscription with two conditions, that just need meeting one of them.
About the 'being visible in user registration', etc... yes, as I wrote above, this doesn't actually belong into custom subscriptions, should be moved to the framework somehow.
At this point I think the most interesting feature to implement would be making subscriptions 'views like' so modules can define default subscriptions, you can enable/disable/clone/edit them to create your own... That would mean moving the notifications custom table into the framework, then keeping this module just as an UI (views_ui?)
Comment #8
glen201 commentedAll the suggestions are great. But, I think a version of this module, perhaps under a different name, would be more useful than this whole bundling BOOLEAN AND approach. Just a simple administrator-forced subscribe to a set of users or all new users that set the appropriate settings in Notifications once, visible in the tag and group lists in the notifications UI, and then let the user take over and manage them. I think this is most appropriate as it doesn't create a new notifications type/tab, and the while check/uncheck of the "bundled" settings is really just a side thing for highly specialized environments.
IMO. I may just even code such a thing hacking this module, because I need to simplify it and make it less confusing for people than to have a series of disjointed subscriptions to the same content.
--glen
Comment #9
danepowell commentedOkay- I agree with Jose's suggestion in 5 about merging all subscriptions into a table with options for visible on user registration, etc... to implement these features in the Notifications framework rather than just in custom subscriptions.
I would also love to see a separate module developed for bundling of subscriptions.
I think these should be the two primary goals that come out of this discussion :)
Comment #10
danepowell commented