Wedge
Public area => Bug reports => The Pub => Archived fixes => Topic started by: Arantor on April 25th, 2012, 10:38 PM
-
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:
'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)
-
I think my English is starting to erode into oblivion because I don't get what you're trying to say here, either... :-/
I don't know what the bug is, what the fix is, and why you can't apply it.
-
The bug is that if you create a user from the admin panel, you can email them their user name and password - but it won't actually tell them where the forum is.
The fix is documented: replace the first bit of code with the second in the email template.
I didn't apply it last night because I had other stuff going on and forgot to add it into the other commit I did.
-
Reminder for you to do it, then ;)
Oh, I found the action bar discussion... It was in 'Board icons'.
-
I've made the change locally, will commit it next time I do a commit :)
-
Committed in r1565.