From 89efb15cd01103c827c513ae3cfdf1400be3b615 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Mon, 6 Apr 2015 22:25:09 -0400 Subject: [PATCH] #169 Now able to dump list of template files and add links for HTML/plaintext --- admin/manage_email_templates.php | 95 ++++++++++++++++++++------------ language/en/text.php | 2 + 2 files changed, 63 insertions(+), 34 deletions(-) diff --git a/admin/manage_email_templates.php b/admin/manage_email_templates.php index 199f3378..1603ba16 100644 --- a/admin/manage_email_templates.php +++ b/admin/manage_email_templates.php @@ -1,36 +1,4 @@
-
+


$value) { + $languages[$key] = $hesk_settings['languages'][$key]['folder']; + } + + // Get all files, but don't worry about index.htm, .., ., or the html folder as we'll assume they both exist + // We'll also assume the template file exists in all language folders + reset($languages); + $firstKey = key($languages); + $firstDirectory = HESK_PATH . 'language/'.$languages[$firstKey].'/emails'; + $directoryListing = preg_grep('/^([^.])/', scandir($firstDirectory)); + $emailTemplates = array_diff($directoryListing, array('html', 'index.htm')); + ?> + + + + + $value): ?> + + + + + + + + + + + + +
+ +
+
-
\ No newline at end of file + + +'; + } else { + $link = sprintf($linkPlaintext, $languageCode, $template); + return + ''; + } + } \ No newline at end of file diff --git a/language/en/text.php b/language/en/text.php index fde4cf83..d39acb6f 100644 --- a/language/en/text.php +++ b/language/en/text.php @@ -24,6 +24,8 @@ $hesklang['EMAIL_HR']='------ Reply above this line ------'; // ADDED OR MODIFIED IN Mods for HESK 2.2.0 $hesklang['email_templates'] = 'Email templates'; $hesklang['email_templates_intro'] = 'You can edit your plaintext and HTML email templates here.'; +$hesklang['edit_plain_text_template'] = 'Edit plain text template'; +$hesklang['edit_html_template'] = 'Edit HTML template'; // ADDED OR MODIFIED IN Mods for HESK 2.1.1 $hesklang['new_article_default_type'] = 'Default Type for New Articles';