News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

How to change the welcome email PHP edit help

Started by etbrown4, March 01, 2011, 06:37:20 PM

Previous topic - Next topic

etbrown4

I know that for SMF 2.0 RC2 you have to edit emailTemplates.english.php

In my php editor I tried to insert text ar around line 40, after the pre-existing phrase .......Should you have any problems with the activation, please visit {ACTIVATIONLINKWITHOUTCODE} and enter the code "{ACTIVATIONCODE}".

I did a carriage return immediately after the text above, and then inserted my own text, just before ...     {REGARDS}',


Well, it did not work and the welcome email comes through unchanged, much to my surprise.

Any tips would be much appreciated!!


Matthew K.

Did you check out the Email Template Editor mod I wrote? There's a WIP/Beta version in a Coding Discussion topic I opened for it. "[WIP] Email Template Editor"

Arantor

You have to empty the cache for changes to take effect.

etbrown4

I uploaded the modified email file to the server, and those changes are there for sure.

I then sent a test 'Welcome email' to a new email address and opened it on a different computer from the one on which I made the text edits.   

Still receiving the standard Welcome email.  Obviously I've done something wrong in the php, I presume.  Unless I'm editing the wrong Welcome phrase!!!!!    My set up requires users to do an email verification only.  So maybe I'm at the wrong place or on the wrong line in this file?
...

From around line 40 in the affected file, emailTemplates.english.php, after the pre-existing phrase .......Should you have any problems with the activation, please visit {ACTIVATIONLINKWITHOUTCODE} and enter the code "{ACTIVATIONCODE}".

(I did a carriage return immediately after the text above, and then inserted my own text, just before ...)     {REGARDS}',
...

As best I can tell, I changed no punctuation or other characters - except adding plain text - after the ",  where I began, and before the (REGARDS)',  where I ended.

Any tips would be most welcome.  :)


Arantor


etbrown4

With 42,000 posts, I feel sure that Arantor is correct about clearing the cache to see the changes.

Can anyone tell me how?

I've tried two different computers from the one on which I made the php edits.

On which of my computers should I try this?

Further I'm all in favor or trying Labradoodle's Email Template Editor.  It's not clear to me if it's available for testing by others or from where you would download it.   Will it work with 2.0 RC2 as I am not savvy enough to do an upgrade?

Arantor

On your forum - Admin > Maintenance > Routine > Empty the file cache

It's available in the thread in question, I have reservations about using it with RC2, and you really, really should upgrade to fix the multiple security flaws that have been fixed since RC2 (though it will remove mods, and themes will need to be updated for RC5). More information on updating: Upgrading SMF

etbrown4

#7
Ok, I cleared the cache!

Now I'm getting Parse error: syntax error, unexpected T_STRING, expecting ')' in /home/obxxxx/public_html/Themes/default/languages/EmailTemplates.english.php on line 50

Other than copy and pasting my edits, I'm not sure how to include them here, although Pretty much my exact attempted edit appears above.

Obviously I've done something wrong. 

Any help would be appreciated.

Arantor

Download them via FTP then attach them to a file.

etbrown4

I don't want to post the problem php text on a public forum for privacy/ copyright reasons . :)

Is there anyone familiar with this who I could pm this short text to, for suggestions?  It's only about 6 lines.

Thanks

Arantor

That would be sort of pointless, seeing how that changing it obviously broke something, so we need to see the whole file and what it is that was changed in order to help you fix it.

etbrown4

I'd be happy to pm the entire file to anyone who might be willing to help.

Thanks

Matthew K.

Have you tried using Email Template Editor, like I suggested earlier?

etbrown4

I'd readily try the email template editor!

I posted earlier that I was unsure if it is fully working yet, and unsure where you would go to download it.

I also was unsure if it would work with 2.0 RC2, as I'm not tech savvy enough to do an upgrade.


Matthew K.

Using Version Emulate, it's very possible it'll work on RC2. It's worth a shot. Here's my latest version of it. Please also note it's not been officially approved by the SMF Customization Team yet.

Arantor

-sigh- Actually the database installer code changed between 2.0 RC2 and 2.0 RC3... and you're encouraging using an ~18 month old version with multiple, quite severe, security problems (good plan, that)

Matthew K.


etbrown4

Ok friends,

I'll bit the bullet and try the upgrade, going from 2.0 RC2 to 2.0 RC5

When I go to the download page, the choices seem to be either FULL INSTALL OR  simply upgrade RC4 to RC5

There does not seem to a choice from earlier versions other than RC4.

Do I have to do the FULL INSTALL?

Many thanks


Matthew K.

No, you can use the "Large Upgrade" package. Make sure you take a full backup of everything before attempting the upgrade, just in case.

Also I'd suggest reading through Upgrading SMF.

Advertisement: