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.

Comments

jmiccolis’s picture

Hey 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?

jmiccolis’s picture

StatusFileSize
new793 bytes

As 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.

jose reyero’s picture

Project: Notifications » Mail to Web
Version: 5.x-1.x-dev » 5.x-1.0-beta1

The patch looks good, but for the variable enclosed in t()

t('RE: '.mail2web_get_pid_subject($node->pid))

Maybe it should be

t('RE: ') .mail2web_get_pid_subject($node->pid)

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 :-)

Ian Ward’s picture

Project: Mail to Web » Mail Comment
Version: 5.x-1.0-beta1 » 5.x-1.0-beta3

Switch to mailcomment project. Mail2web is now known as "mailcomment" due to a trademark issue with the name mail2web.

Ian Ward’s picture

Status: Needs review » Closed (fixed)

This issue is now replaced by http://drupal.org/node/706588 ... closing this.