We can customize the mail context now, it's so great, but could we customize the mail subject too ?
It's fixed "!site :: new comment for your post." now.

Comments

lomz’s picture

If you search for !site :: new comment for your post. in the localizer.module you can translate it.
Or you have to search for the same sentence in the comment_notify,module to change it the hardcoded way if you are using english drupal

greggles’s picture

You can also use locale to translate from "english" to "my english" and then modify it.

I agree, though, it would be nice to be able to set the subject in some configurable way.

greggles’s picture

Version: 5.x-1.x-dev » 7.x-1.x-dev

If it happens it will be for 6.x.

zilla’s picture

can you do this now with the 'string overrides' module without adding into this module (for time being)?

greggles’s picture

I believe so, yes.

zilla’s picture

honestly, and i don't mean this to be darkly comical, i find the string overrides module most useful for getting rid of nerdy drupal language (it's all over the place, legacy text throughout drupal instead of plain language) AND for correcting output from modules developed by non-native english speakers who are trying to put out a first release in english only (things like "sing in here" instead of sign in etc...) - it's a very powerful little tool and keeps people out of core module files or other core drupal stuff...in my mind a perfect candidate for a 'core' utility ;)

greggles’s picture

It is in core. It's called "locale".

String Overrides was developed to be a "light weight" solution beyond locale, but subsequent performance tests show that locale and string overrides are about the same speed.

zilla’s picture

@greggles - didn't realize that...i know that people have used locale for the same purpose for a long time, the SO module just seemed to be a more intuitive way to handle minor edits and modifications for users who don't want to mess around with language related changes - and coupled with tools like form editors, it's quite useful...

guitarrasybajos’s picture

Mee too,
Its a necessary feature.

Offtopic:
If you are using flat comments, users can not understand the “all comments” or “replies to my comment option”

greggles’s picture

Offtopic:

Quite - better to open a new issue.

If you are using flat comments, users can not understand the “all comments” or “replies to my comment option”

Administer > Site configuration > Comment notify. Disable the "replies to my comment" option. Then users will only see a checkbox and will no longer be confused.

guitarrasybajos’s picture

they can still seen it in their personal menu (My account).

greggles’s picture

WildBill’s picture

Just wanted to steer this back to the original issue - the need for a customizable Subject field...

malclocke’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
StatusFileSize
new6.67 KB

Attached patch is against 6.x-1.x-dev, allows configurable subject for author and commenter emails and keeps defaults as they were. Same substitution variables are available as in the message bodies.

Offlein’s picture

Status: Active » Reviewed & tested by the community

Patch worked for me! +1

greggles’s picture

Status: Reviewed & tested by the community » Needs work

"Works for me" is not a "review". Patches need a review prior to RTBC status.

My initial review makes me think that node_notify_default_mailsubject is not a great variable name (it follows pattern for other variables for this module, but it isn't properly namespaced with comment_notify at the beginning).

We also need to delete the variable comment_notify_default_mailsubject on uninstall.

And, ideally this should be done for 7.x first and 6.x only after that.

Offlein’s picture

Good points all. I get a little overzealous with my clicking-finger.

malclocke’s picture

StatusFileSize
new5.87 KB

My initial review makes me think that node_notify_default_mailsubject is not a great variable name (it follows pattern for other variables for this module, but it isn't properly namespaced with comment_notify at the beginning).

Modified patch attached using comment_notify_author_mailsubject

We also need to delete the variable comment_notify_default_mailsubject on uninstall.

Not required as there is already a DELETE FROM variable WHERE name LIKE 'comment_notify_%' in hook_uninstall()

And, ideally this should be done for 7.x first and 6.x only after that.

Sorry, don't have a 7.x platform to test on.

crshumate’s picture

tea.time’s picture

Seconding this request.

tea.time’s picture

Here's a fairly simple workaround that worked for me.

See: http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hoo...
and: http://api.drupal.org/api/drupal/includes--mail.inc/function/drupal_mail/6
noting "The final e-mail id for e-mail altering will be {$module}_{$key}."

Sample code:


function mymodule_mail_alter(&$message){
	if($message['id'] == 'comment_notify_comment_notify_mail'){ // comment_notify.module, line 435
		$message['subject'] = "A new comment was posted after your comment."
	}
}

matt.rad’s picture

Old thread, but still interested in seeing this in the module.

Thanks.

greggles’s picture

This is still waiting on a patch for 7.x.

acy76’s picture

Version: 6.x-1.x-dev » 7.x-1.2
Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new1.82 KB

Attached is a patch against 7.x-1.2 which adds fields to the admin form for editing email subject lines. This patch simply exposes the existing variables for email subjects from inside the admin form. Please review.

Status: Needs review » Needs work

The last submitted patch, 24: comment_notify-edit_mail_subject-173979-24.patch, failed testing.

pafla’s picture

Stille no solution for D7

Pafla

acy76’s picture

Status: Needs work » Needs review
StatusFileSize
new1.7 KB

Here is a tweak of the patch in #24 -- sloppy diff on my part. Let's see if this passes testing.

Status: Needs review » Needs work

The last submitted patch, 27: comment_notify-edit_mail_subject-173979-27.patch, failed testing.

tommyk’s picture

Version: 7.x-1.2 » 8.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new2.35 KB

Here’s a patch to get this into the D8 branch.

damienmckenna’s picture

Status: Needs review » Reviewed & tested by the community

FYI I've pulled these changes into a patch on #2618182: Support all entity types as commentable, not only nodes.

The last submitted patch, 18: comment_notify-173979-18.patch, failed testing. View results

gnuget’s picture

Status: Reviewed & tested by the community » Fixed

#2618182: Support all entity types as commentable, not only nodes has been fixed we can close this one as well.

Thanks!

Status: Fixed » Closed (fixed)

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