Issue 0000598: NBM: Add new informations

Css style including on mail are save on separated files.
Default and local can be defined!

git-svn-id: http://piwigo.org/svn/trunk@1797 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub
2007-02-10 17:43:11 +00:00
parent 4f620255a2
commit 9adbcc7d13
8 changed files with 71 additions and 29 deletions
+26
View File
@@ -206,6 +206,32 @@ function pwg_mail($to, $from = '', $subject = 'PhpWebGallery', $infos = '', $for
'MAIL' => get_webmaster_mail_address()
));
$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'))
{
$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->root = PHPWG_ROOT_PATH.'template-common';
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_COMMON', 'mail_css_local_template');
}
$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 ?
$conf_mail[$email_format]
[$lang_info['charset']]