Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: cancasa on January 01, 2011, 03:54:52 PM

Title: How to edit email template
Post by: cancasa on January 01, 2011, 03:54:52 PM
Happy New Year to all the great people on SMF.

Question.............
Does anyone know how to edit the email template for forum account activation?
I would like to add a few extra notes and correct an existing error in the text.

Cheers
Title: Re: How to edit email template
Post by: kat on January 01, 2011, 04:29:44 PM
ManageMembers.english.php, in the default theme's "languages" directory, mate, I believe.

If not, check Login.english.php for this:

// For the below three messages, %1$s is the display name, %2$s is the username, %3$s is the password, %4$s is the activation code, and %5$s is the activation link (the last two are only for activation.)
$txt['register_immediate_message'] = 'You are now registered with an account at ' . $context['forum_name'] . ', %1$s!' . "\n\n" . 'Your account\'s username is %2$s and its password is %3$s.' . "\n\n" . 'You may change your password after you login by going to your profile, or by visiting this page after you login:' . "\n\n" . $scripturl . '?action=profile' . "\n\n" . $txt[130];
$txt['register_activate_message'] = 'You are now registered with an account at ' . $context['forum_name'] . ', %1$s!' . "\n\n" . 'Your account\'s username is %2$s and its password is %3$s (which can be changed later.)' . "\n\n" . 'Before you can login, you first need to activate your account. To do so, please follow this link:' . "\n\n" . '%5$s' . "\n\n" . 'Should you have any problems with activation, please use the code "%4$s".' . "\n\n" . $txt[130];
$txt['register_pending_message'] = 'Your registration request at ' . $context['forum_name'] . ' has been received, %1$s.' . "\n\n" . 'The username you registered with was %2$s and the password was %3$s.' . "\n\n" . 'Before you can login and start using the forum, your request will be reviewed and approved.  When this happens, you will receive another email from this address.' . "\n\n" . $txt[130];

// For the below two messages, %1$s is the user's display name, %2$s is their username, %3$s is the activation code, and %4$s is the activation link (the last two are only for activation.)
$txt['resend_activate_message'] = 'You are now registered with an account at ' . $context['forum_name'] . ', %1$s!' . "\n\n" . 'Your username is "%2$s".' . "\n\n" . 'Before you can login, you first need to activate your account. To do so, please follow this link:' . "\n\n" . '%4$s' . "\n\n" . 'Should you have any problems with activation, please use the code "%3$s".' . "\n\n" . $txt[130];
$txt['resend_pending_message'] = 'Your registration request at ' . $context['forum_name'] . ' has been received, %1$s.' . "\n\n" . 'The username you registered with was %2$s.' . "\n\n" . 'Before you can login and start using the forum, your request will be reviewed and approved.  When this happens, you will receive another email from this address.' . "\n\n" . $txt[130];
Title: Re: How to edit email template
Post by: cancasa on January 01, 2011, 04:32:56 PM
Quote from: K@ on January 01, 2011, 04:29:44 PM
ManageMembers.english.php, in the default theme's "languages" directory, mate, I believe.

Thanks K, very supportive as ever.
I'll have a tinker and let you know if I succeed.

HNY  :) ;)
Title: Re: How to edit email template
Post by: cancasa on January 01, 2011, 05:29:53 PM
I found the file. The login.php one.
Where it says "forum_name" do I just go ahead and insert the name of my forum ie Cancasa Forum as it leaves it blank when the message is received.....this is what the message in the email starts like: You are now registered with an account at , mark!

There is a blank before the user name is inserted.
At the end of the message it says "Rgds, The Team". Where can I change the text so that it says something else?
And just a thought, does this mean I have to insert the forum name in all the messages.

Sorry K but just want to be certain I cover all the issues.  :)
Title: Re: How to edit email template
Post by: kat on January 01, 2011, 05:38:58 PM
I believe that it pulls the forum name from whatever you have in Admin>Server Settings, where it says "Forum Title" (Top of the second section).

I could be wrong, though. ;)

Title: Re: How to edit email template
Post by: cancasa on January 17, 2011, 05:57:46 PM
Just been looking at this again today and still can't figure out how to personalise emails to members.
I've been on other smf forums and noticed the email templates have been changed to suit the sites.
Is there something I could install that will allow me to just type the text I want in the email template?  :)
Title: Re: How to edit email template
Post by: Illori on January 17, 2011, 06:00:48 PM
can you post the text you wish for it to say? someone may be able to do the edits for you.
Title: Re: How to edit email template
Post by: cancasa on January 17, 2011, 06:03:49 PM
Thanks Illori, I'll need a bit of time so I'll have to get back to you on that. Many thanks.  ;)
Title: Re: How to edit email template
Post by: cancasa on January 18, 2011, 10:13:56 AM
I filled in the forum name as K@ suggested and it seems to have filled in the missing words ok.
Think it's best I don't tamper with the template as I might mess it up.

Out of interest, under my profile, I have "Admin" which is clickable and Administrator which is not.
How can I remove the Administrator and replace with something else so that my profile has a unique name.  :)
Title: Re: How to edit email template
Post by: Illori on January 18, 2011, 11:08:04 AM
in smf 1.1.* you can not rename the administrator member group, i believe in smf 2.0 you can rename it. you can attempt to rename it in the database though, but a backup would be suggested before attempting.
Title: Re: How to edit email template
Post by: cancasa on January 18, 2011, 12:07:41 PM
Won't be going anywhere near the database but as you can see in the image below, I have duplicate names.
I can understand having "Admin" which carries the link to the profile page, but if there was an easy way to remove "Administrator" it would have been great.

Guess I'm stuck with it although it looks odd that something so basic does not have a simple solution.
Thanks anyway Illori.  :)
Title: Re: How to edit email template
Post by: JimM on January 23, 2011, 07:15:26 PM
I think the reason it appears that its duplicated is because you chose to use Admin as your username.  Not everyone does that.  Administrator is the membergroup so that is why it's not clickable.  I suppose you could edit the template so that the membergroup is not displayed.
Title: Re: How to edit email template
Post by: cancasa on January 26, 2011, 11:27:37 AM
Thanks Jim.
Have not been concentrating. I just figured out that you can change the name so hopefully that should solve it.
The help on this forum is great.

Much appreciated.  :)