Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
.../languages/English/email_role_change.txt Question
So .../languages/English/email_role_change.txt is the skeleton for all e-mails
sent upon "Role Changes", but the text is so dry as to be confusing to a less-than
sophisticated user of discussion groups, moreso when it is the first message
sent to an Applicant who has been approved.
Is it possible to have one template for each type of role change, so that the
text can be less generic, and more "friendly" to the new member?
This seems to be something that would require more coding than I would want
to attempt. I've looked at the various extensions, and I have found nothing.
Has anyone made their e-mails more "friendly"? Could they post what they
have done?
Thanks!
sent upon "Role Changes", but the text is so dry as to be confusing to a less-than
sophisticated user of discussion groups, moreso when it is the first message
sent to an Applicant who has been approved.
Is it possible to have one template for each type of role change, so that the
text can be less generic, and more "friendly" to the new member?
This seems to be something that would require more coding than I would want
to attempt. I've looked at the various extensions, and I have found nothing.
Has anyone made their e-mails more "friendly"? Could they post what they
have done?
Thanks!
0
This discussion has been closed.
Comments
So change line 153 from
$this->DelegateParameters['EmailBody'] = &$EmailBody;
to
$this->DelegateParameters['Email'] = &$e;
And then to modify the message before its sent, your extension would look something like this:
function ModifyMessage(&$Context) { $e = &$Context->DelegateParameters['Email']; $AffectedUser = &$Context->DelegateParameters['AffectedUser']; Switch ($AffectedUser->Role) { 'Douchebag': $e->Body .= 'Be nice or your new icon stays!!'; break; 'Master Administrator': $e->Body .= 'Play nice while I am out of town.'; break; } } $Context->AddToDelegate('ModifyMessage','UserManager','PreRoleChangeNotification')
(warning: typed from known unreliable memory of syntax, all untested code)