hey Jose, this patch is about improved title handling for comment subjects when using mail2web. When you reply to a post via mail2web now, unless you change the subject of the email to something custom, the subject will be "RE: {text from notifications alert}" which only works well if ou set notifications subject to be just [title]. Usually this is like: "RE: Comment for Post Name". This patch will look at what the parent comment title was, and use "RE: {parent comment title}" and if it has no parent comment, it will use "RE: {title of node}" The handling is not so robust if you look at the code, so maybe there's a better way, like looking at the variable setting in notifications, etc.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | mail2web-title.diff | 793 bytes | jmiccolis |
| notifications_mail2web_titles.patch | 1.91 KB | Ian Ward |
Comments
Comment #1
jmiccolis commentedHey Gents,
Instead of adding "RE: Parent title" as the default for when titles aren't altered could we use the normal Drupal behavior of grabbing the first few words from the comment/email and using that as the title?
This would preserve a common formatting for comments posted on the web and though email. (Additionally if comment titles aren't allowed we could respect that too).
Thoughts?
Comment #2
jmiccolis commentedAs a start attached is a small patch that simply generates a title for the comment from the body.
In the future then we can add check here that compares the title with what would have been sent out to determine if it's been customized. We'd need to regenerate that title from the original node and the title token pattern which is used for the kind of notification that it was.
Comment #3
jose reyero commentedThe patch looks good, but for the variable enclosed in t()
Maybe it should be
Anyway, maybe we shouldn't make any assumption on the client's default language and try a regexp with different combinations, like upper and lower case 'Re:', t('Re:'), etc...
However, I'm not the maintainer anymore of this one :-)
Comment #4
Ian Ward commentedSwitch to mailcomment project. Mail2web is now known as "mailcomment" due to a trademark issue with the name mail2web.
Comment #5
Ian Ward commentedThis issue is now replaced by http://drupal.org/node/706588 ... closing this.