]> git.wh0rd.org - tt-rss.git/commitdiff
added a personalized email template. if the file:
authorjustauser <justausr@hotmail.com>
Wed, 29 May 2013 20:23:04 +0000 (16:23 -0400)
committerjustauser <justausr@hotmail.com>
Wed, 29 May 2013 20:23:04 +0000 (16:23 -0400)
my_email_article_template.txt

exists it will be used, otherwise the default will be used

plugins/mail/init.php

index 5b61c2355517c6ab4e0fb9d8d3dae02fba0673f2..3b1582081d885d82097a2eb630f90a88c1a97e25 100644 (file)
@@ -50,7 +50,10 @@ class Mail extends Plugin {
                $tpl = new MiniTemplator;
                $tpl_t = new MiniTemplator;
 
-               $tpl->readTemplateFromFile("templates/email_article_template.txt");
+               $templ_name = "templates/email_article_template.txt";
+               if(file_exists("templates/my_email_article_template.txt"))
+                       $templ_name = "templates/my_email_article_template.txt";
+               $tpl->readTemplateFromFile($templ_name);
 
                $tpl->setVariable('USER_NAME', $_SESSION["name"], true);
                $tpl->setVariable('USER_EMAIL', $user_email, true);