Subscribers only receive one e-mail notification per thread until new messages read (i.e. node page visited.)

Comments

RyanR’s picture

Title: one notification per subscriber until new messages read » Only send one notification until node has been visited.

I was just about to enter a feature request for this same topic. In other sites I have used where I subscribe to hear about updates, I would only be told about an update to a topic once until I visit the site again (or the topic). This way I'm not bombarded with loads of emails every time a change is made, even if I haven't had a chance to visit the site.

mattev’s picture

I agree. I was recently heavily spammed with comments to a few threads (now resolved) but subscriptions sent out a new notification for each spam message resulting in some users getting 20 or more notifications. Come to think of it, it would be nice if comments that were unpublished by the spam module did not result in a notification until they were approved and published by an admin.

johnhanley’s picture

I actually have this working in version 4.6. I simply check the number of new comments for each subscriber (user) and send a notification if equal to 1. In the notification message the user is informed that they must visit the thread before receiving another notification for that particular thread (and effectively keeps them subscribed.) Note that this solution only works when notification is set to immediate. Cron notifications would need further development.

ricmadeira’s picture

Yeah, this feature would be great to have!

davidteall’s picture

Is this feature going to be added to the 4.7 version or can I use the 4.6 version on 4.7? I'm about to disable the module because I'm getting so many multiple notifications. My site is for a UK-wide club divided into Regions. Each region has its own pages updated by a Regional Editor. If the editor has 20 goes at updating a page because he is not quite sure how to do it, members ger 20 notifications and then write to me to complain!

ricmadeira’s picture

Yeah, receiving notifications for each editing of a node is a real pain in the neck. :(

I think at least that problem can be solved more easily.

davidteall’s picture

One further point, having re-read the opening Description. Most of my site uses pages with each region having their own taxonomy term. I therefore use subscriptions almost exclusively via what it calls categories. I need it restricted to one notification per category (not thread) until a page in that category is visted.

ajwwong’s picture

Status: Active » Needs review
StatusFileSize
new1.8 KB

With credit due to *BacteriaMan*, here's a patch against the latest 4.7 that does what the original poster requests... **only one subscription notification** is sent until the node has been visited [with the user logged in].... Thanks BacMan for the hard work!

[Incidentally... apparently it only works if notifications are set to "immediate"... rather than by cron]

Good luck all! Feel free to review! :-)

And Blessings,
Albert

salvis’s picture

Could this be an option? I'm working in the opposite direction: to include body text in the message so that people who only want to read a forum need not to visit the site at all. Of course my way works better for low volume forums and I understand both needs, so body text should also be an option, I guess.

davidteall’s picture

I'm working in the opposite direction: to include body text in the message so that people who only want to read a forum need not to visit the site at all.

That would be an excellent addition and, yes, it would need to be an Option. It is already available in Notify so maybe there is some code there that would be helpful.

davidteall’s picture

With credit due to *BacteriaMan*, here's a patch against the latest 4.7 that does what the original poster requests... **only one subscription notification** is sent until the node has been visited [with the user logged in]

Very many thanks ajwwong, but how do I use it? I guess I need to paste all or some of it into the original subscriptions.module file, but where do I put it and do I put every line? Sorry to be so ignorant, but there it is - I am!

ilbeppe’s picture

When this feature for drupal 5?

mindless’s picture

StatusFileSize
new1.67 KB

Here is the same patch for the drupal 5.x version.

(neither this nor the 4.7.x patch are ready for CVS because it would need to be optional..)

geodaniel’s picture

I like the sound of this patch, haven't had a chance to test it out yet though

Anonymous’s picture

I tried the patch on Drupal 5, but it lead to the whole site freezing (PHP error in the script) - I'd love to see a workable patch for Drupal 5.1!

Anonymous’s picture

Has anyone else managed to get the patch working on Drupal 5.x? I get more and more complaints from my users as the get swamped with announcements and having this patch would be a tremendous help!

mindless’s picture

anything in your watchdog log? i never tried it out, but the patch looks ok to me.

Anonymous’s picture

I do not have watchdog installed, so the only thing I can tell you is I updated to the patched module and the whole site froze. There was a PHP error in the module (interestingly though in a line that was not in the module - it was something like error in line 1589 when the module only had 1570 lines)...

Anonymous’s picture

Encouraged by mindless's comment I downloaded the fresh module and the patch again, applied and tested it - and so far it has neither crashed my site nor sent out numerous emails where one would have been enough. I will continue to test it, but so far it looks fine to me and should definitely be included in the module soon!

salvis’s picture

Status: Needs review » Closed (fixed)

I'm sorry, this would have to start from scratch, because version 5.x-2.0 was started from scratch (now in beta test).