I submit a small new module for inclusion in core drupal - replies.module. This module sends email notifications to all participants in a thread. The aim is to fulfill our long standing desire for subscriptions in core. This is a small step. I'd rather not add too many features for now.

Please see the contrib module named 'replies' for the patch. I submit the .info and .module files for consideration by core. Until I need to patch existing core files, it is more efficient to maintain the files in Contrib. I hope thats acceptable.

This module is running successfully at http://:www.mothersclick.com.

This module depends on the token functionality proposed at http://drupal.org/node/113614.

Comments

walkah’s picture

Status: Needs review » Needs work

This doesn't actually look ready for HEAD (hook_menu is 5.x, e.g.) ?

+1 for this functionality in Drupal 6 though (even if simple as a first pass - the inclusion of a hook is a good start).

thehong’s picture

Fun, but I don not need this module. It should be an additional modules.

-1

moshe weitzman’s picture

oh i forgot - anything that thehong doesn't need should be tossed from core.

@walkah - is true that is for drupal5 now. i guess i'd like some nod from a committer that this will be considered and i'll port right away.

this patch is a step towards getting rid of the awful "subscribe" postings in issues on drupal.org. once this goes in, we will ideally convert followups to comments and then get notifications for free. i plan to enhance this module so that one can subscribe to a node without posting a comment.

dww’s picture

@moshe - i just quickly skimmed the code for replies.module. after looking at replies_getrecipients(), i'm confused. you still have to add a comment to subscribe to a thread, which is what i thought this whole thing was supposed to avoid. or is that proposed for round 2? eventually, you'll add your own table for this module, to track "silent subscriptions", sort of like project_issue.module does for the customized email issue subscription stuff, but more fine-grained? ideally, the silent subscriptions would also showup in the tracker, if there was a way to do that which didn't kill performance of the tracker again.

sorry, duh, re-reading comment #3: i plan to enhance this module so that one can subscribe to a node without posting a comment.. ;) hehe, in that case, could you elaborate a little? would that be targetted for D6 core, too, or not? if not, would it be possible to extend replies.module with a hook so that contribs could implement their own notion of who subscribed to a node via whatever means they want?

speaking of feature creep, once we have a separate table for the subscriptions so you don't need to comment, it'd be nice if there was a way to unsubscribe from a node that you commented on (where unsubscribe means no email, no activity in your tracker, etc). that's outside the scope of the original patch, but i'd like to hear about if/how you'd plan to support that in the future.

re: issue followups as comments, see http://drupal.org/node/18920.

anyway, i don't want to complicate this particular issue with too many feature requests, but i've certainly thought about this problem a lot and would like to see the big picture plan for where this functionality is going, even if the initial patch is relatively small and simple, which lays the basis for further work.

thanks,
-derek

moshe weitzman’s picture

i'm willing to add the "silent subscription" feature (with unsubscribe link) for D6 if i can get some nods from committers. tracker.module honoring subscriptions is really a different beast which i am not even sure is a good idea. lets leave that aside for now.

dmitrig01’s picture

Status: Needs work » Active

this doesn't have a patch

dww’s picture

Status: Active » Needs review

didn't read the post:

"Please see the contrib module named 'replies' for the patch."

dmitrig01’s picture

good point...

kbahey’s picture

This module is needed on many sites. Having it in core is a good idea.

Some comments:

- There does not seem to be a way for users to turn of email replies. So if the site admin turns this module on, there is no way to stop the spam from coming.

- Why call the hook "replies_mine", as opposed to just "replies"?

- The emails are sent in real time. If there are big threads with many participants, or many comments being posted to different threads, this could increase the server load. Not a concern on small sites, but better point to this in the help and README.

- Another approach (overkill for a simple module in core, but perhaps a contrib that uses the replies hook can do that), is to batch the emails with a threshold and have cron send them once an hour or day ...etc.

+1 for core nonetheless.

moshe weitzman’s picture

Status: Needs review » Needs work

I haven't been working on this module because Dries said "i'm concerned about the token.module dependancy". I love token and see it belonging in core, but not everyone agrees yet. so really i think we need to work on token before this. this could be rewritten to not use token, but i'm stubborn and don't like that approach much. until, this is in Contrib for whomever wants it.

webchick’s picture

Status: Needs work » Postponed

Sounds like this is an appropriate status.

catch’s picture

Version: 6.x-dev » 7.x-dev
Status: Postponed » Needs work
moshe weitzman’s picture

Assigned: moshe weitzman » Unassigned
Status: Needs work » Postponed
mfer’s picture

Didn't see this issue when I posted http://drupal.org/node/322064.

Was there ever an issue to move token to core? I couldn't find one.

pancho’s picture

dfer:
Indeed there is: See #113614: Add centralized token/placeholder substitution to core. I really hope it's getting included, because so many contrib modules depend on Token.

dave reid’s picture

Version: 7.x-dev » 8.x-dev
webchick’s picture

Status: Postponed » Active

Token is in core now, so this is no longer postponed. It is D8, though, because it is a new feature.

moshe weitzman’s picture

Damn - I completely forgot about this issue. I would have updated the code when I saw token get committed. Will do for D8, unless someone beats me to it.

dave reid’s picture

Status: Active » Closed (duplicate)

There's been a lot more discussion in #322064: Add comment notifications via e-mail so I'm going to mark this as a duplicate of that issue (sorry). Blame the system, not the messenger. :)