Closed (fixed)
Project:
Notifications
Version:
6.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Jul 2009 at 12:59 UTC
Updated:
29 Dec 2010 at 20:55 UTC
Jump to comment: Most recent file
Comments
Comment #1
edwardcuf commentedThis is something that I would love to see too.
This would be good so I can automatically subscribe people to content under certain conditions.
I'm using the flag module which has rules integration and I'm looking for...
If user sets flag > auto subscribe to this content.
It just needs the notifications to rules connection to work.
I'm sure there is lots of other uses too
Comment #2
alvinet commentedsubscribe
Comment #3
jwaxman commentedYes. We just need two new Actions -- "Subscribe" and "Unsubscribe"
We could then use Rules, Triggers or Views Bulk Operations to manage subscriptions.
It would need to be a configurable Action to allow for the different subscription types: node, content type, tag, author, feed, etc; an organic group chooser and the particular id of the node, author, etc id.
There's instructions for creating an action here http://www.sysarchitects.com/node/47.
I wish I knew enough to do this myself.
Comment #4
apt94jesse commentedSubscribe
Comment #5
jwaxman commentedOkay.
I wanted this badly enough to try to figure it out myself.
Here's my first attempt at a notifications_actions module.
Install it.
Create a Views Bulk Operations View of users.
Pick the subscriptions types you'd like to have access to.
This is truly my first attempt at a module and ,in fact, my first time writing more than a line or two of PHP.
Much of the code was lifted from places within the official notifications modules.
Use at your own risk on a site that you've backed up.
I have no idea if this will be useful to anyone but me.
I suppose if it is I'll have to figure out the official way to post a new module.
I'm working on recreating delete, activate, deactivate, change interval, etc actions.
In theory these are simple but there's an extra step to making them VBO compatible.
VBO doesn't do "notifications" related things out of the box.
In the meantime the notifications modules itself handles these functions well from its admin page.
Comment #6
ycimlynn commentedsubscribe
Comment #7
pydubreucq commentedsubscribe
Comment #8
R.Hendel commentedsubscribe
Comment #9
cchan commentedSubscribing. I am currently working on a rules addon module for Notifications.
Comment #10
pimousse98 commentedsubscribing
Comment #11
nicks commentedsubscribe
Comment #12
BenK commentedSubscribing, too..
Comment #13
tpainton commented1+. Really what would be awesome is integration into rules. Specifically allow a notify action to occur with any trigger. For instance, send notifications on workflow changes and of course any of the many triggers available to rules.
Comment #14
michellezeedru commentedSubscribing
Comment #15
danepowell commentedSubscribing- I will definitely be evaluating and improving on the patch above, and I'd like to see this get incorporated into the notifications_extra package eventually.
Comment #16
danepowell commentedI can confirm that the patch works- good job! I am going to work on improving it a bit, especially on getting rid of all of the hardcoded notifications_actions_[subscription-type]_action functions (so that it will work out-of-the-box with any subscription type, including custom subscriptions)
Comment #17
danepowell commentedBummer- I'd like to let admins create an advanced action "Subscribe users to...". Then on the advanced action creation page they could choose what type of subscription (content type, taxonomy term, etc..) and then select a value.
However, it would appear that since on the advanced action creation form we are at the mercy of the system_actions_configure function, there is no way to preserve form state in order to let admins first select a subscription type and then select the corresponding value in a way appropriate for that type. Anybody have any other ideas about how we can do this without hardcoding all of the different subscription types?
Comment #18
danepowell commentedHere is my idea- why don't we take the core of this patch (notifications_actions_subscribe_action_form, etc...) and integrate it into the notifications module. Then we distribute the ancillary functions (notifications_actions_subscribe_to_thread_action, etc...) to their respective modules.
So each type of notifications module would implement its own hook_action_info, notifications_actions_subscribe_to_[type]_action_form, notifications_actions_subscribe_to_[type]_action_validate, etc... using the templates here- basically just copy and paste out of this patch and into the other modules. This way we don't have to centrally hardcode actions for every type of subscription in existence.
Comment #19
TripleEmcoder commentedSubscribing.
Comment #20
Alan.Guggenheim commentedWe need something like that too. Subscribing
Comment #21
danepowell commentedFYI, you need to get rid of the
&s in the function calls - call-time pass-by-reference has been deprecated in recent versions of PHPComment #22
jacoblane commentedsubscribing
Comment #23
zeezhao commentedsubscribing
Comment #24
nassimo3 commentedSubscribing
Comment #25
muschpusch commentedsubscribe
Comment #26
geek-merlinwant this too.
Comment #27
gilcpd commentedsubscribe
Comment #28
castelar commentedI need this also. My use case:
User flags a taxonomy term as "interesting", then the user is automatically subscribed to notifications for that term.
Can we start a chipin or another fundraising widget to get this integrated? This would be amazing!
Comment #29
jdwfly commentedThis would be very good to have in the notifications module. I looked over the module that was submitted in number 5 and it was ok, but I think it would be better to actually use the Rules API instead of creating drupal actions. I went ahead and created a very simple module which I will attach to this post. All it does is give you a "Subscribe an arbitrary User to node notifications" action to fire inside of a rule. I didn't want to go too far with it, but I see two ways of progressing.
Also bumped this up to 4.x-dev since it looks like all the new features are being developed there. I'd also like to get the maintainers opinion on this. I'd even be willing to do all the work since I am going to need this on the project I am currently working on.
Comment #30
rezvani63 commentedThanks for your module,
I installed your module and set the settings in Rules module to autosubscribe a user to a node after he saved a new comment on that node.
But after saving new comment, he is not subscribed to that node (in my case a post to group), although below messages are shown to user:
* 0 ms "After saving a new comment" has been invoked.
* 0.137 ms Executing the rule "After saving a new Comment" on rule set "After saving a new comment"
* 1.588 ms Loaded variable "created comment author"
* 10.218 ms Loaded variable "commented content"
* 10.295 ms Action execution: "Subscribe a user to node notifcations"
* 15.11 ms Evaluation of "After saving a new comment" has been finished.
Can you recognize the problem and find the solution?
Thank you
Comment #31
jdwfly commentedSorry, I was using username instead of uid but I switched it and missed one of the variables. This should work now as long as you are putting the uid of the user you want to subscribe.
Comment #32
rezvani63 commentedThat's great now,
Thank you
Comment #33
bibo commentedSo notifications_rules.zip from #31 will only work with the 4.x-dev version?
(+subscribe)
Comment #34
pribeh commentedsubscribing.
Comment #35
Bilmar commentedSubscribing - this new feature would be a powerful tool that could be used with other contrib modules
Comment #36
davidwhthomas commentedI extended jdwfly's module from #31 to provide unsubscribe and subscribe rules.
I added a setting for subscribe to allow using the current user uid, rather than a hard set uid.
To subscribe the current user, just enter "user" in the setting textfield.
I use this to successfully subscribe / unsubscribe users to node notifications when flagging / unflagging content.
See attached.
DT
Comment #37
davidwhthomas commentedOne more addition to #36:
* Allows either hard set uid in unsubscribe form, or current user - same as subscribe rule settings.
DT
Comment #38
jdwfly commentedLets not get too carried away with developing this since it is hard to track changes in an issue. I've contacted the developer of the module to see what he would like to do with this. I'm willing to continue work on it since I am using it as a part of an internal tool I am developing. I'm just waiting to see if the dev wants to include this into notifications or as just another contributed module.
Comment #39
davidwhthomas commentedAgreed, an issue queue isn't the place for module development, however I added the minor enhancement here for completeness and simplicity ( for the time being ) - and to help the considerable number of people who have subscribed to this issue.
DT
Comment #40
YK85 commentedwow! This is really awesome. I will be testing your Rules Integration module this week. Just as another example, the User Relationships - Rules Integration module lived and was developed in the Issue thread for 1.5 years before being added into the core module #468764: Rules integration. I hope the maintainer of Notifications will allow the Rules Integration to live in the Notifications module. Thanks again!
Comment #41
jdwfly commentedI got in contact with the module developer of notifications and he would rather have this in its own separate module. Please direct any further issues to it.
http://drupal.org/project/notifications_rules
@yaz085 - developing a module in an issue queue for 1.5 years is not something I would want to repeat :)
Comment #42
davidwhthomas commentedThanks jdwfly.
DT