diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php index 68df98e10..81559ac80 100644 --- a/include/functions_mail.inc.php +++ b/include/functions_mail.inc.php @@ -208,34 +208,29 @@ function pwg_mail($to, $from = '', $subject = 'PhpWebGallery', $infos = '', $for if ($email_format == 'text/html') { - if (is_file($mail_template->root.'/default-layout-mail-css.tpl')) - { - $mail_template->set_filename('mail_css_default_template', 'default-layout-mail-css.tpl'); - $mail_template->assign_var_from_handle('MAIL_CSS_DEFAULT_TEMPLATE', 'mail_css_default_template'); - } - $old_root = $mail_template->root; - $mail_template->root = PHPWG_ROOT_PATH.'template/'.$user['template'].'/theme/'.$user['theme']; - if (is_file($mail_template->root.'/layout-mail-css.tpl')) + if (is_file($mail_template->root.'/global-mail-css.tpl')) { - $mail_template->set_filename('mail_css_theme', 'layout-mail-css.tpl'); - $mail_template->assign_var_from_handle('MAIL_CSS_THEME', 'mail_css_theme'); + $mail_template->set_filename('global_mail_css', 'global-mail-css.tpl'); + $mail_template->assign_var_from_handle('GLOBAL_MAIL_CSS', 'global_mail_css'); + } + + $mail_template->root = PHPWG_ROOT_PATH.'template/'.$user['template'].'/theme/'.$user['theme']; + if (is_file($mail_template->root.'/mail-css.tpl')) + { + $mail_template->set_filename('mail_css', 'mail-css.tpl'); + $mail_template->assign_var_from_handle('MAIL_CSS', 'mail_css'); } $mail_template->root = PHPWG_ROOT_PATH.'template-common'; - if (is_file($mail_template->root.'/local-layout-mail-css.tpl')) + if (is_file($mail_template->root.'/local-mail-css.tpl')) { - $mail_template->set_filename('mail_css_local_template', 'local-layout-mail-css.tpl'); - $mail_template->assign_var_from_handle('MAIL_CSS_LOCAL_COMMON', 'mail_css_local_template'); + $mail_template->set_filename('local_mail_css', 'local-mail-css.tpl'); + $mail_template->assign_var_from_handle('LOCAL_MAIL_CSS', 'local_mail_css'); } $mail_template->root = $old_root; - if (is_file($mail_template->root.'/local-layout-mail-css.tpl')) - { - $mail_template->set_filename('mail_css_local_template', 'local-layout-mail-css.tpl'); - $mail_template->assign_var_from_handle('MAIL_CSS_LOCAL_TEMPLATE', 'mail_css_local_template'); - } } // what are displayed on the header of each mail ? diff --git a/template/yoga/mail/text/html/default-layout-mail-css.tpl b/template/yoga/mail/text/html/global-mail-css.tpl similarity index 96% rename from template/yoga/mail/text/html/default-layout-mail-css.tpl rename to template/yoga/mail/text/html/global-mail-css.tpl index 8c62124d9..dd65efff3 100644 --- a/template/yoga/mail/text/html/default-layout-mail-css.tpl +++ b/template/yoga/mail/text/html/global-mail-css.tpl @@ -1,4 +1,5 @@ /* $Id$ */ +/* Global mail css */ /* Including like css style on HTML mail */ body{background-color:#fff;font-family: Univers, Helvetica, Optima;font-size:12px; margin:0px;padding:0px; color:#369;} diff --git a/template/yoga/mail/text/html/header.tpl b/template/yoga/mail/text/html/header.tpl index 3d13d7766..20d3a9780 100644 --- a/template/yoga/mail/text/html/header.tpl +++ b/template/yoga/mail/text/html/header.tpl @@ -5,10 +5,9 @@ PhpWebGallery Mail diff --git a/template/yoga/theme/clear/layout-mail-css.tpl b/template/yoga/theme/clear/mail-css.tpl similarity index 96% rename from template/yoga/theme/clear/layout-mail-css.tpl rename to template/yoga/theme/clear/mail-css.tpl index 5b40a0b20..549113132 100644 --- a/template/yoga/theme/clear/layout-mail-css.tpl +++ b/template/yoga/theme/clear/mail-css.tpl @@ -1,4 +1,5 @@ /* $Id$ */ +/* Theme mail css */ /* Including like css style on HTML mail */ body{background-color:#fff; color:#696969;} diff --git a/template/yoga/theme/dark/layout-mail-css.tpl b/template/yoga/theme/dark/mail-css.tpl similarity index 96% rename from template/yoga/theme/dark/layout-mail-css.tpl rename to template/yoga/theme/dark/mail-css.tpl index 54d95d73c..393f0629f 100644 --- a/template/yoga/theme/dark/layout-mail-css.tpl +++ b/template/yoga/theme/dark/mail-css.tpl @@ -1,4 +1,5 @@ /* $Id$ */ +/* Theme mail css */ /* Including like css style on HTML mail */ body{background-color:#444; color:#fff;} diff --git a/template/yoga/theme/p0w0/layout-mail-css.tpl b/template/yoga/theme/p0w0/mail-css.tpl similarity index 96% rename from template/yoga/theme/p0w0/layout-mail-css.tpl rename to template/yoga/theme/p0w0/mail-css.tpl index b10e81d4d..ab57f27a8 100644 --- a/template/yoga/theme/p0w0/layout-mail-css.tpl +++ b/template/yoga/theme/p0w0/mail-css.tpl @@ -1,4 +1,5 @@ /* $Id$ */ +/* Theme mail css */ /* Including like css style on HTML mail */ body{background-color:#cde; color:#369;} diff --git a/template/yoga/theme/wipi/layout-mail-css.tpl b/template/yoga/theme/wipi/mail-css.tpl similarity index 96% rename from template/yoga/theme/wipi/layout-mail-css.tpl rename to template/yoga/theme/wipi/mail-css.tpl index a3be9fd8a..e24583928 100644 --- a/template/yoga/theme/wipi/layout-mail-css.tpl +++ b/template/yoga/theme/wipi/mail-css.tpl @@ -1,4 +1,5 @@ /* $Id$ */ +/* Theme mail css */ /* Including like css style on HTML mail */ body{background-color:#111; color:#69c;}