It would be great if we had the possibility to use replacement patterns for the "New Answer" Notification Email like [site:url], [site:mail] etc...

Comments

jibus’s picture

Title: Ability to use token for the "New Answer" Notification Email » New dynamic variable for the "New Answer" Notification Email: !site_url
Status: Active » Needs review

I update this post.

It would be great to have a dynamic variable to the "New Answer" Notification Email wich represent the base url of the Drupal installation.

I purpose to add a new token !site_url:

I don't know (yet) how to purpose a patch, so below is the proposition:

In answers.notify.inc

At line 36 & 38:

Replace

'#description' => t('Dynamic variables available: !question_user_name, !answer_user_name, !question_title, !question_url, and !site'),

by

'#description' => t('Dynamic variables available: !question_user_name, !answer_user_name, !question_title, !question_url, !site and !site_url'),

At line 91

Below

global $user;

Add

global $path;

And finally

At line 91

Below

'!site' => variable_get('site_name', 'drupal'),

Add

'!site_url' => $base_url,

chipcleary’s picture

Status: Needs review » Fixed
StatusFileSize
new2.92 KB

Great, thanks for working through this, @Jibus.

Patch now attached and also committed to 7.x-3.x-dev.

Please note, I made one small change from what's above. I think you meant global $base_url not global $path.

jibus’s picture

Oh yes, you are right ! Thanks for the correction !

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Bad...bad english :x