Closed (fixed)
Project:
Answers
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2012 at 11:35 UTC
Updated:
2 Apr 2012 at 09:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
jibus commentedI 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,Comment #2
chipcleary commentedGreat, 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_urlnotglobal $path.Comment #3
jibus commentedOh yes, you are right ! Thanks for the correction !
Comment #4.0
(not verified) commentedBad...bad english :x