It's not something I think you'd encounter that often but a user that I look after just reported this to me in SMF and I see no reason why we would have touched this thus far.
If you register a user from the admin panel, it will email them with the username and password but it actually won't email them a link to the forum >_<
And because of how the templates are set up, well, it's a bit more complex. I'm going to document the SMF code fix here because that's what has to be done first, but then we can fix it in Wedge just after since the code should be virtually if not actually identical.
We need to create somewhere we can actually inject the $scripturl into. Themes/default/languages/EmailTemplates.english.php:
Code: [Select]
Replace with:
Code: [Select]
The line's a bit crap but I deliberately did not want to leave it as the closing element on the line, for all the fun and games the trailing . would leave.
Other thoughts:
After finding loadEmailTemplate, I discovered that {SCRIPTURL} is a replacement that's already handled natively there, though I have to admit I didn't think it was, and started digging into where the replacements were defined in Subs-Members.php for that email. Though I have to say, loadEmailTemplate is in a funny place and it makes me wonder about doing other things with restructuring internal facilities, perhaps like moving all the email functions into one place and invoking that when needed rather than this other slightly weird hierarchy of things needed. (Subs-Post.php, primarily, for all the email related stuff, even sending PMs)
If you register a user from the admin panel, it will email them with the username and password but it actually won't email them a link to the forum >_<
And because of how the templates are set up, well, it's a bit more complex. I'm going to document the SMF code fix here because that's what has to be done first, but then we can fix it in Wedge just after since the code should be virtually if not actually identical.
We need to create somewhere we can actually inject the $scripturl into. Themes/default/languages/EmailTemplates.english.php:
'admin_register_immediate' => array(
'subject' => 'Welcome to {FORUMNAME}',
'body' => 'Thank you for registering at {FORUMNAME}. Your username is {USERNAME} and your password is {PASSWORD}.
{REGARDS}',
),Replace with:
'admin_register_immediate' => array(
'subject' => 'Welcome to {FORUMNAME}',
'body' => 'Thank you for registering at {FORUMNAME}. Your username is {USERNAME} and your password is {PASSWORD}.
You can reach {FORUMNAME} by visiting {SCRIPTURL} in your browser.
{REGARDS}',
),The line's a bit crap but I deliberately did not want to leave it as the closing element on the line, for all the fun and games the trailing . would leave.
Other thoughts:
After finding loadEmailTemplate, I discovered that {SCRIPTURL} is a replacement that's already handled natively there, though I have to admit I didn't think it was, and started digging into where the replacements were defined in Subs-Members.php for that email. Though I have to say, loadEmailTemplate is in a funny place and it makes me wonder about doing other things with restructuring internal facilities, perhaps like moving all the email functions into one place and invoking that when needed rather than this other slightly weird hierarchy of things needed. (Subs-Post.php, primarily, for all the email related stuff, even sending PMs)


