In my settings for comment notify, I have the first check box checked "Let registered users select notification on a node basis". Which is fine, but when a registered user goes to post a new comment, the default is to have "Notify me of follow-up comments posted here" unchecked. Is there any way to change that to be checked by default?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggles’s picture

Category: support » feature

Sure, that seems like a reasonable.

Do you think that should be the same checkbox as the current one or a whole new checkbox?

benkenney’s picture

It would be nice to give registered users the option of always receiving notifications (that is, letting them specify whether the "Notify me of follow-up comments posted here" check box is checked by default or un-checked by default).

As the owner of the site, my preference would be for all users to have to actively turn this feature off instead of actively turn the feature on...in my experience with forums that have a similar feature, it really does keep me coming back to see what the latest comment was.

greggles’s picture

Title: Notifying registered users by default » Don't notify registered users by default - let them opt-in and provide help to change the default.
Status: Active » Needs review
FileSize
3.03 KB
12.77 KB
10.49 KB

Actually, I think this is already possible, though you are right that it defaults to "on" for users when it should be "opt-in"

So, what I'd like to do is default it to "off" and then also provide a little help at the checkbox (if the checkbox is shown and the user is logged in) so they can click to change the default value.

Attached are:

1) checkbox_comment_help.png which shows what the new help text on the checkbox will look like for registered users.
2) comment_notify_user.png which shows the box everyone already has to set their personal default
3) the patch which adds the help text visible in item 1 and makes the box in item 2 default to off.

Sound good?

greggles’s picture

Version: 5.x-1.4 » 5.x-2.x-dev
Assigned: Unassigned » greggles
Status: Needs review » Fixed

One note - when I did a similar change for making the default anonymous action opt-in I also provided a script to update all old comments to make sure that they were "opt-in". There's no easy way to do that this time so I'm not going to...

Also, this is now fixed in the 5.x-2.x version. http://drupal.org/cvs?commit=130453

halfiranian’s picture

Sorry to be a pain, but I really liked having registered users automatically subscribed to comment updates.

Is there a simple way for me to do this?

In an ideal world, I'd like:

- the profile checkbox ticked by default for receiving notifications
- no checkbox below the comment form

Is this no longer possible with 2.0?

Cheers,

James

greggles’s picture

Title: Don't notify registered users by default - let them opt-in and provide help to change the default. » Provide admin control over default notification for registered useres
Assigned: greggles » Unassigned
Status: Fixed » Active

Well, that is no longer possible. Let's give another checkbox for it (I will work on this in the next few days, but if you or someone else wants to work on it before then that is fine).

halfiranian’s picture

Thanks mate. I don't think my skills are up to it. I'm in no rush though.

James

Pushkar Gaikwad’s picture

I too want the registered user get notified check box to be selected by default and I am just wondering, if the problem can not be fixed, what that patch is all about ?

Let me guess the default behavior of the module 2.x on drupal 5.7

Anon - default selected
Regis - default not selected

Right ?

greggles’s picture

The default behavior (should be) that both default to not selected. I believe that it is respectful to users to require them to opt-in to mail. It may even be a matter of legality in some countries (I have a vague memory of that...).

However, I don't wish for this to be hard-coded and feel that it should be something which the admin can control on a per-site basis.

Pushkar Gaikwad’s picture

greggles, how to do it than ? :) I mean how to set the checkbox selected by default for the registered members ?

greggles’s picture

It's not available yet - that's why this feature request is "active."

greggles’s picture

Assigned: Unassigned » greggles
Status: Active » Needs review
FileSize
4.1 KB

@poseidon123 - here's a patch for it. Could you please help test it?

skuft’s picture

FileSize
7.06 KB

Hi greggles,

Thanks for great module...

I'd also like to have this feature - the option for admins to control whether or not comment notification is on or off by default.

I tried the patch, but received some errors - I'm not totally up to speed with patching etc, so apologies in advance...

patching file comment_notify.module
Hunk #1 FAILED at 128.
Hunk #2 FAILED at 137.
Hunk #3 FAILED at 306.
Hunk #4 FAILED at 534.
4 out of 4 hunks FAILED -- saving rejects to file comment_notify.module.rej

Log files attached.

Thanks!

drein’s picture

I have the same problem, can't patch the file.
are we speaking of the same file?
the last stable version of the 0.5 branch, 12 oct 2008.

skuft’s picture

yes - same file

drein’s picture

Arg!
Ok I think I am a stupid.
Why I want to patch the stable version if the version in the issue says:
5.x-2.x-dev?
I think we should download the dev version that have a different date and try that!
I'll do that tomorrow.
grrrrrr.

drein’s picture

Sorry, I tried to patch the dev version but I have the same results.
So, or this is a problem of the windows version of the patch.exe, or there are problems with the patch.

drein’s picture

FileSize
6.33 KB

I patch it! It was a Windows problem. You should save the interested files in dos charachter not unix.
Anyway I attacch the comment_notify.module patched so you can try it.
I'm not sure the patch works well.
I have a new combobox that can control the behaviour for registered users, but I try to make a comment and I don't receive any notify.
But please make a test and let me know.
Other thing is that it requires a patch also for the "receive a notify for own post" checkbox, but 1 thing a time.

greggles’s picture

Version: 5.x-2.x-dev » 7.x-1.x-dev
FileSize
5.19 KB

Sorry about the last patch being bad - maybe I fixed some things which broke the patch and also maybe I people are testing it with the wrong version (sorry I wasn't specific about that).

Here's a new patch against the tip of the 6.x branch.

drein’s picture

I'm sorry I can't test it, because this is for d6.
I hope you will include this feature also in the d5 version.

greggles’s picture

@drein - my focus is on 6.x at this point so I am writing code for 6.x and backporting as possible or where someone else does the work. If you would like to help maintain the 5.x branch I would appreciate that. One thing is that patch files in Drupal do use Unix line endings. Also, I prefer to follow the project standard of using patch files rather than zipped bundles of files (see http://drupal.org/patch/create for more details).

DanielJohnston’s picture

Subscribing. Opt-out notification as default for all users is essential to getting this working for the kind of users I have on my site. The present interface is difficult for me to understand, let alone my customers. As an additional suggestion, merging node and comment notification options would also be handy - I find it confusing to have different options and different types of control box for these two things. Otherwise, an excellent module, and essential for any community site with unregistered commenting.

greggles’s picture

@DanielJohnston - can you test the patch? I'd like to have someone else test it...

DanielJohnston’s picture

Hi Greggles. I'm running Drupal 5 at the moment, not upgrading for another month or two. Is there a 5 version of this patch I can test?

greggles’s picture

Title: Provide admin control over default notification for registered useres » Provide admin control over default notification for registered users
Status: Needs review » Patch (to be ported)

@DanielJohnston - I don't plan to maintain the 5.x version any more. If someone else wants to re-roll patches for it then I would test/commit them.

I'm marking all the issues as "patch (to be ported)" to help with this process.

aclight’s picture

Version: 7.x-1.x-dev » 5.x-2.x-dev
Status: Patch (to be ported) » Needs review
FileSize
5.2 KB

Here's a patch for the D5 version.

I noticed the use of two variables with very similar names, comment_notify_default_regged_mailalert and comment_notify_default_registered_mailalert. I wonder if one of these is a typo in the patch that got committed to the D6 version.

greggles’s picture

Great - thanks. And here's one more patch to clean up my variable problem. I had started to rename it and then forgot...

@aclight - I can make this change to your patch. I'd also be happy to make you a co-maintainer so you can commit the 5.x stuff directly.

aschiwi’s picture

Thank you aclight, I tried your patch on 5.x-2.x-dev and got this:

Hunk #2 FAILED at 137.
Hunk #3 succeeded at 296 (offset -10 lines).
Hunk #4 succeeded at 371 (offset -10 lines).
Hunk #5 succeeded at 508 (offset -18 lines).
Hunk #6 succeeded at 516 (offset -18 lines).
1 out of 6 hunks FAILED -- saving rejects to file comment_notify.module.rej

I also tried it for the regular (not dev) D5 release, but that didn't work either. Any ideas?

I have to say it was hard to even find the option on the user/edit page, it doesn't say in the readme.txt that there are settings there and it would be good to be able to set a default for all users on the comment_notify settings page. Hmmm, I just went back and checked the comment_notify settings page in 5.x-2.2 and saw I had checked the option "Let registered users select notification on a node basis". If I turn that option off, will users be notified of comments to nodes they created? This is what I needed in the first place, but I had checked the option upon configuring the module before noticing that I wasn't subscribed to comments on my own nodes...

***edit: unchecking the option "Let registered users select notification on a node basis" just hides that option from the user's user/edit page. That doesn't help though :-)

aclight’s picture

Status: Needs review » Needs work

Patch #26:

apfel-ethernet /drupal/iex/dev/sites/all/modules/comment_notify: patch -p0 --dry-run < 229582_registered_default.d5.patch 
patching file comment_notify.module
Hunk #2 FAILED at 137.
Hunk #3 succeeded at 296 (offset -10 lines).
Hunk #4 succeeded at 371 (offset -10 lines).
Hunk #5 succeeded at 508 (offset -18 lines).
Hunk #6 succeeded at 516 (offset -18 lines).
1 out of 6 hunks FAILED -- saving rejects to file comment_notify.module.rej

Patch #27:

apfel-ethernet /drupal/iex/dev/sites/all/modules/comment_notify_6: patch -p0 --dry-run < 326310_variable_rename6.patch 
patching file comment_notify.install
Hunk #1 FAILED at 67.
1 out of 1 hunk FAILED -- saving rejects to file comment_notify.install.rej
patching file comment_notify.module
Hunk #1 FAILED at 113.
1 out of 1 hunk FAILED -- saving rejects to file comment_notify.module.rej

Setting back to CNW

greggles’s picture

Assigned: greggles » Unassigned

I didn't mean to stay assigned to this...I don't work on 5.x-2.x any more.

bmblack’s picture

Version: 5.x-2.x-dev » 6.x-1.4

Is it possible to get this feature on the newest version (6.x-1.4)??

I have no experience with patching. Would anybody possibly be able to patch and then upload the entire module? I would like to be able to have the option for users to "Receive node follow-up notification e-mails" set by DEFAULT. I would REALLY appreciate any help with this.

Thank you!!

greggles’s picture

I believe it is working on the 6.x-1.4 branch. If not, we should certainly look into it.

bmblack’s picture

You're right ... Somehow I didn't see the option to set the node notifications by default. I did however come across something interesting.

If you choose to have notifications by default, it APPEARS to work ... if I create a new account and edit my profile, the option is already checked. Nothing is written to the database though. The user does not receive a notification unless they edit their profile and save it. This isn't really a huge problem since my users will most likely edit their profile the first time they log on ... but thought it was worth mentioning

  • greggles committed 56da698 on 8.x-1.x
    feature #229582 by greggles: Don't notify registered users by default -...
  • greggles committed ed39284 on 8.x-1.x
    feature #229582 by greggles: Provide admin control over default...
greggles’s picture

Issue summary: View changes
Status: Needs work » Fixed

I think this is right now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.