aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2007-02-10 17:43:11 +0000
committerrub <rub@piwigo.org>2007-02-10 17:43:11 +0000
commit9adbcc7d13397d7b449f23e64317b1557ae87c12 (patch)
tree4caf379c14c7d42f205abf636ba1d15d74f4a877
parent4f620255a232eb98dc0c5991c7d78de35a6a75e7 (diff)
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
-rw-r--r--include/functions_mail.inc.php26
-rw-r--r--template/yoga/mail/text/html/default-layout-mail-css.tpl19
-rw-r--r--template/yoga/mail/text/html/default-layout.css8
-rw-r--r--template/yoga/mail/text/html/header.tpl27
-rw-r--r--template/yoga/theme/clear/layout-mail-css.tpl5
-rw-r--r--template/yoga/theme/dark/layout-mail-css.tpl5
-rw-r--r--template/yoga/theme/p0w0/layout-mail-css.tpl5
-rw-r--r--template/yoga/theme/wipi/layout-mail-css.tpl5
8 files changed, 71 insertions, 29 deletions
diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php
index b44697078..98f5b5a1d 100644
--- a/include/functions_mail.inc.php
+++ b/include/functions_mail.inc.php
@@ -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']]
diff --git a/template/yoga/mail/text/html/default-layout-mail-css.tpl b/template/yoga/mail/text/html/default-layout-mail-css.tpl
new file mode 100644
index 000000000..cf506b7e0
--- /dev/null
+++ b/template/yoga/mail/text/html/default-layout-mail-css.tpl
@@ -0,0 +1,19 @@
+/* $Id$ */
+/* 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;}
+#the_page {background: #fff url({pwg_root}template/{themeconf:template}/mail/text/html/images/mailbody-bg.jpg) repeat-y scroll left top;
+margin:0px;padding:0px;text-align: left;}
+a {text-decoration: none}
+#content {background: transparent url({pwg_root}template/{themeconf:template}/mail/text/html/images/header-bg.jpg) no-repeat scroll left top;
+margin:0px;padding:82px 0px 0px 62px;}
+hr {width:632px;margin-left:0px;}
+#copyright {background: transparent url({pwg_root}template/{themeconf:template}/mail/text/html/images/footer-bg.jpg) no-repeat scroll left bottom;
+color: #69c;font-size:10px;margin:0px;padding:98px 0px 62px 62px;}
+.PWG {font-family: verdana, sans-serif !important; font-size: 0.9em; font-weight: normal; letter-spacing: 0px;}
+a.PWG { border: 0px; }
+a.PWG .P { color : #f92; }
+a.PWG .W { color : #aaa; }
+a.PWG .G { color : #69c; }
+a.PWG:hover .P { color : #69c; }
+a.PWG:hover .G { color : #f92; }
diff --git a/template/yoga/mail/text/html/default-layout.css b/template/yoga/mail/text/html/default-layout.css
deleted file mode 100644
index d415a371f..000000000
--- a/template/yoga/mail/text/html/default-layout.css
+++ /dev/null
@@ -1,8 +0,0 @@
-/* $Id$ */
-
-BODY#theMailPage #content
-{
- margin: 2em;
- text-align: left;
-}
-
diff --git a/template/yoga/mail/text/html/header.tpl b/template/yoga/mail/text/html/header.tpl
index ed0304f7f..3d13d7766 100644
--- a/template/yoga/mail/text/html/header.tpl
+++ b/template/yoga/mail/text/html/header.tpl
@@ -2,28 +2,13 @@
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="{LANG}" dir="{DIR}">
<head>
-<title>PhpWebGallery Notication by Mail</title>
+<title>PhpWebGallery Mail</title>
<meta http-equiv="Content-Type" content="text/html; charset={CONTENT_ENCODING}">
-
-<!--<link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/mail/text/html/default-layout.css">-->
-
-<style><!-- /* Notification mini style for mails */
-body{background-color:#fff;font-family: Univers, Helvetica, Optima;font-size:12px; margin:0px;padding:0px; color:#369;}
-#the_page {background: #fff url({pwg_root}template/{themeconf:template}/mail/text/html/images/mailbody-bg.jpg) repeat-y scroll left top;
-margin:0px;padding:0px;text-align: left;}
-a {text-decoration: none}
-#content {background: transparent url({pwg_root}template/{themeconf:template}/mail/text/html/images/header-bg.jpg) no-repeat scroll left top;
-margin:0px;padding:82px 0px 0px 62px;}
-hr {width:632px;margin-left:0px;}
-#copyright {background: transparent url({pwg_root}template/{themeconf:template}/mail/text/html/images/footer-bg.jpg) no-repeat scroll left bottom;
-color: #69c;font-size:10px;margin:0px;padding:98px 0px 62px 62px;}
-.PWG {font-family: verdana, sans-serif !important; font-size: 0.9em; font-weight: normal; letter-spacing: 0px;}
-a.PWG { border: 0px; }
-a.PWG .P { color : #f92; }
-a.PWG .W { color : #aaa; }
-a.PWG .G { color : #69c; }
-a.PWG:hover .P { color : #69c; }
-a.PWG:hover .G { color : #f92; }
+<style><!-- /* Mini style for mails */
+{MAIL_CSS_DEFAULT_TEMPLATE}
+{MAIL_CSS_THEME}
+{MAIL_CSS_LOCAL_TEMPLATE}
+{MAIL_CSS_LOCAL_COMMON}
--></style>
</head>
<body>
diff --git a/template/yoga/theme/clear/layout-mail-css.tpl b/template/yoga/theme/clear/layout-mail-css.tpl
new file mode 100644
index 000000000..936c81426
--- /dev/null
+++ b/template/yoga/theme/clear/layout-mail-css.tpl
@@ -0,0 +1,5 @@
+/* $Id$ */
+/* Including like css style on HTML mail */
+
+body{background-color:#ffffff;}
+#the_page {background-color: #ffffff;}
diff --git a/template/yoga/theme/dark/layout-mail-css.tpl b/template/yoga/theme/dark/layout-mail-css.tpl
new file mode 100644
index 000000000..884dbb5de
--- /dev/null
+++ b/template/yoga/theme/dark/layout-mail-css.tpl
@@ -0,0 +1,5 @@
+/* $Id$ */
+/* Including like css style on HTML mail */
+
+body{background-color:#000000;}
+#the_page {background-color: #000000;}
diff --git a/template/yoga/theme/p0w0/layout-mail-css.tpl b/template/yoga/theme/p0w0/layout-mail-css.tpl
new file mode 100644
index 000000000..cc939fdd9
--- /dev/null
+++ b/template/yoga/theme/p0w0/layout-mail-css.tpl
@@ -0,0 +1,5 @@
+/* $Id$ */
+/* Including like css style on HTML mail */
+
+body{background-color:#dfe8ff;}
+#the_page {background-color: #dfe8ff;}
diff --git a/template/yoga/theme/wipi/layout-mail-css.tpl b/template/yoga/theme/wipi/layout-mail-css.tpl
new file mode 100644
index 000000000..652354ff8
--- /dev/null
+++ b/template/yoga/theme/wipi/layout-mail-css.tpl
@@ -0,0 +1,5 @@
+/* $Id$ */
+/* Including like css style on HTML mail */
+
+body{background-color:#111;}
+#the_page {background-color: #111;}