Page 1 of 1
Email Content
Posted: Sat Dec 20, 2008 6:37 pm
by codetwists
How can I edit the content of email sent out by Serendipity?
Re: Email Content
Posted: Sat Dec 20, 2008 6:39 pm
by garvinhicking
Hi!
Either through code change, change of the constants in the language file or creation of an event plugin. That depends on the exact modifications you want to make.
Regards,
Garvin
Changing the email content in the language file
Posted: Sat Dec 20, 2008 6:49 pm
by codetwists
I thought it might be in a language file somewhere, but I'm not familiar enough with all of the various files and I was unable to locate the right one. Can you point me in the right direction?
Thanks for your help!
Myron
Re: Changing the email content in the language file
Posted: Sat Dec 20, 2008 6:53 pm
by garvinhicking
Hi!
Yes, if you tell me which E-Mail you are referring to.
You can check includE/functions.inc.php, the serendipity_sendMail() function. For example, it uses the SIGNATURE constant, found in lang/(UTF-8)/serendipity_lang_XX.inc.php. Other common constants are A_NEW_COMMENT_BLAHBLAH for comment mails.
Simply open the language file and search for the text that you received in the correspondig mail.
Regards,
Garvin
Re: Changing the email content in the language file
Posted: Sat Dec 20, 2008 7:13 pm
by codetwists
garvinhicking wrote:Simply open the language file and search for the text that you received in the correspondig mail.
Thats works! Thanks!
Myron
Posted: Sat Dec 20, 2008 7:21 pm
by Don Chambers
Is this just my imagination, or did we once discuss the possibility that various emails might be converted to tpl's? If we didn't discuss it, it sure would be a cool feature.
Posted: Sat Dec 20, 2008 7:44 pm
by garvinhicking
Hi!
Don Chambers wrote:Is this just my imagination, or did we once discuss the possibility that various emails might be converted to tpl's? If we didn't discuss it, it sure would be a cool feature.
We did, and I had a look, and it's much harder than I initially anticipated. It would mean loosing all current constants because the new way would be mor more harder to template and style. Then this would even be harder than to edit the mail contents through constants, because the whole tpl would be full of placeholders...
Regards,
Garvin