aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/themes/default/default-layout.css2
-rw-r--r--admin/themes/default/template/plugins_new.tpl2
-rw-r--r--include/functions_mail.inc.php57
-rw-r--r--themes/Sylvia/mail-css.tpl6
-rw-r--r--themes/clear/mail-css.tpl5
-rw-r--r--themes/dark/mail-css.tpl7
-rw-r--r--themes/default/images/mail/footer-bg.pngbin15656 -> 0 bytes
-rw-r--r--themes/default/images/mail/header-bg.pngbin30525 -> 0 bytes
-rw-r--r--themes/default/images/mail/index.php30
-rw-r--r--themes/default/images/mail/mailbody-bg.pngbin924 -> 0 bytes
-rw-r--r--themes/default/template/mail/text/html/global-mail-css.tpl2
11 files changed, 66 insertions, 45 deletions
diff --git a/admin/themes/default/default-layout.css b/admin/themes/default/default-layout.css
index b5a565e8e..0cfd9619c 100644
--- a/admin/themes/default/default-layout.css
+++ b/admin/themes/default/default-layout.css
@@ -770,7 +770,7 @@ h2:lang(en) { text-transform:capitalize; }
#helpContent LI, #ftpPage LI {margin-top:10px;}
#helpContent P.nextStepLink {text-align:center; font-weight:bold; margin-bottom:20px;}
-#configContent FIELDSET {border:none;}
+#configContent FIELDSET, #availablePlugins FIELDSET {border:none;}
/**
* Informations box in administration
diff --git a/admin/themes/default/template/plugins_new.tpl b/admin/themes/default/template/plugins_new.tpl
index 1c3f50d22..f2c91aa85 100644
--- a/admin/themes/default/template/plugins_new.tpl
+++ b/admin/themes/default/template/plugins_new.tpl
@@ -30,6 +30,7 @@ jQuery().ready(function(){ldelim}
</div>
{if not empty($plugins)}
+<div id="availablePlugins">
<fieldset>
<legend></legend>
{foreach from=$plugins item=plugin name=plugins_loop}
@@ -66,6 +67,7 @@ jQuery().ready(function(){ldelim}
</div>
{/foreach}
</fieldset>
+</div>
{else}
<p>{'There is no other plugin available.'|@translate}</p>
{/if} \ No newline at end of file
diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php
index 5322e2165..e2aa9ceae 100644
--- a/include/functions_mail.inc.php
+++ b/include/functions_mail.inc.php
@@ -771,6 +771,62 @@ function pwg_send_mail($result, $to, $subject, $content, $headers)
}
}
+function move_ccs_rules_to_body($content)
+{
+ // We search all css rules in style tags
+ preg_match('#<style>(.*?)</style>#s', $content, $matches);
+
+ if (!empty($matches[1]))
+ {
+ preg_match_all('#([^\n]*?)\{(.*?)\}#s', $matches[1], $matches);
+
+ $selectors = array();
+ $unknow_selectors = '';
+
+ foreach ($matches[1] as $key => $value)
+ {
+ $selects = explode(',', $value);
+ $style = trim($matches[2][$key], ' ;');
+
+ foreach($selects as $select)
+ {
+ $select = trim($select);
+ $selectors[$select][] = $style;
+ }
+ }
+ foreach ($selectors as $selector => $style)
+ {
+ if (!preg_match('/^(#|\.|)([A-Za-z0-9_-]*)$/', $selector, $matches))
+ {
+ $unknow_selectors .= $selector.' {'.implode('; ', $style).";}\n";
+ }
+ else switch ($matches[1])
+ {
+ case '#':
+ $content = preg_replace('|id="'.$matches[2].'"|', 'id="'.$matches[2].'" style="'.implode('; ', $style).';"', $content);
+ break;
+ case '.':
+ $content = preg_replace('|class="'.$matches[2].'"|', 'class="'.$matches[2].'" style="'.implode('; ', $style).';"', $content);
+ break;
+ default:
+ $content = preg_replace('#<'.$matches[2].'( |>)#', '<'.$matches[2].' style="'.implode('; ', $style).';"$1', $content);
+ break;
+ }
+ }
+
+ // Keep unknow tags in page head
+ if (!empty($unknow_selectors))
+ {
+ $content = preg_replace('#<style>.*?</style>#s', "<style type=\"text/css\">\n$unknow_selectors</style>", $content);
+ }
+ else
+ {
+ $content = preg_replace('#<style>.*?</style>#s', '', $content);
+ }
+ }
+ return $content;
+}
+
/*Testing block*/
/*function pwg_send_mail_test($result, $to, $subject, $content, $headers, $args)
{
@@ -800,6 +856,7 @@ add_event_handler('send_mail', 'pwg_send_mail_test', EVENT_HANDLER_PRIORITY_NEUT
add_event_handler('send_mail', 'pwg_send_mail', EVENT_HANDLER_PRIORITY_NEUTRAL, 5);
+add_event_handler('send_mail_content', 'move_ccs_rules_to_body');
trigger_action('functions_mail_included');
?>
diff --git a/themes/Sylvia/mail-css.tpl b/themes/Sylvia/mail-css.tpl
index 66d51cac1..a579f7a0b 100644
--- a/themes/Sylvia/mail-css.tpl
+++ b/themes/Sylvia/mail-css.tpl
@@ -1,11 +1,9 @@
/* Theme Sylvia mail css */
body {ldelim} background-color:#111; color:#666;}
-#the_page {ldelim} }
-#content {ldelim} }
-#copyright {ldelim} background: transparent url({$ROOT_URL}themes/{$themeconf.theme}/images/bottom-left-bg.jpg) no-repeat scroll left bottom;
+#copyright {ldelim} background: transparent url({$ROOT_URL}themes/Sylvia/images/bottom-left-bg.jpg) no-repeat scroll left bottom;
min-height: 220px; height: 220px; width: 100%; min-width: 100%; padding: 10px 100px 30px 100px; }
-h2 {ldelim} color:#f70;background: transparent url({$ROOT_URL}themes/{$themeconf.theme}/images/fillet.gif) repeat-x scroll left bottom; padding-bottom: 5px;}
+h2 {ldelim} color:#f70;background: transparent url({$ROOT_URL}themes/Sylvia/images/fillet.gif) repeat-x scroll left bottom; padding-bottom: 5px;}
img {ldelim} margin: 16px; border: 16px solid #444; -moz-border-radius: 4px; border-radius: 4px 4px; }
img:hover {ldelim} padding: 15px; border: 0; background-color:#222;-moz-border-radius: 4px; border-radius: 4px 4px; }
a {ldelim} color: #f70; background-color: transparent; border:0; text-decoration: none;}
diff --git a/themes/clear/mail-css.tpl b/themes/clear/mail-css.tpl
index 6c5e149cd..c61e369ef 100644
--- a/themes/clear/mail-css.tpl
+++ b/themes/clear/mail-css.tpl
@@ -1,10 +1,7 @@
/* Theme clear mail css */
body {ldelim} background-color:#fff; color:#696969;}
-#the_page {ldelim} background: #fff url({$ROOT_URL}themes/default/images/mail/mailbody-bg.png) repeat-y scroll left top;}
-#content {ldelim} background: transparent url({$ROOT_URL}themes/default/images/mail/header-bg.png) no-repeat scroll left top;}
-#copyright {ldelim} background: transparent url({$ROOT_URL}themes/default/images/mail/footer-bg.png) no-repeat scroll left bottom;
-color: #333;}
+#copyright {ldelim} background: transparent; color: #333;}
h2 {ldelim} background-color: #ddd;}
img {ldelim} margin: 16px; border: 16px solid #aaa; -moz-border-radius: 4px; border-radius: 4px 4px; }
img:hover {ldelim} padding: 15px; border: 1px solid yellow;background-color:#faebd7; -moz-border-radius: 4px; border-radius: 4px 4px; }
diff --git a/themes/dark/mail-css.tpl b/themes/dark/mail-css.tpl
index e904a248d..6399c9efd 100644
--- a/themes/dark/mail-css.tpl
+++ b/themes/dark/mail-css.tpl
@@ -1,11 +1,8 @@
/* Theme dark mail css */
body {ldelim} background-color:#444; color:#fff;}
-#the_page {ldelim} background: #444 url({$ROOT_URL}themes/default/images/mail/mailbody-bg.png) repeat-y scroll left top;}
-#content {ldelim} background: transparent url({$ROOT_URL}themes/default/images/mail/header-bg.png) no-repeat scroll left top;}
-#copyright {ldelim} background: transparent url({$ROOT_URL}themes/default/images/mail/footer-bg.png) no-repeat scroll left bottom;
-color: #69c;}
-h2 {ldelim} background-color: #333;color:#fff48e;background-image: url({$ROOT_URL}themes/{$themeconf.theme}/images/tableh1_bg.png);}
+#copyright {ldelim} color: #69c;}
+h2 {ldelim} background-color: #333; color:#fff48e;}
img {ldelim} margin: 16px; border: 16px solid #111; -moz-border-radius: 4px; border-radius: 4px 4px; }
img:hover {ldelim} padding: 15px; border: 1px solid yellow;background-color:#444;-moz-border-radius: 4px; border-radius: 4px 4px; }
a {ldelim} color: #fff48e; background: transparent;border-bottom:1px dotted #005e89; }
diff --git a/themes/default/images/mail/footer-bg.png b/themes/default/images/mail/footer-bg.png
deleted file mode 100644
index fd3c2925f..000000000
--- a/themes/default/images/mail/footer-bg.png
+++ /dev/null
Binary files differ
diff --git a/themes/default/images/mail/header-bg.png b/themes/default/images/mail/header-bg.png
deleted file mode 100644
index 1770a3ddc..000000000
--- a/themes/default/images/mail/header-bg.png
+++ /dev/null
Binary files differ
diff --git a/themes/default/images/mail/index.php b/themes/default/images/mail/index.php
deleted file mode 100644
index 17747c927..000000000
--- a/themes/default/images/mail/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2010 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/themes/default/images/mail/mailbody-bg.png b/themes/default/images/mail/mailbody-bg.png
deleted file mode 100644
index 722a24f63..000000000
--- a/themes/default/images/mail/mailbody-bg.png
+++ /dev/null
Binary files differ
diff --git a/themes/default/template/mail/text/html/global-mail-css.tpl b/themes/default/template/mail/text/html/global-mail-css.tpl
index 5c8e87a54..072bcb0be 100644
--- a/themes/default/template/mail/text/html/global-mail-css.tpl
+++ b/themes/default/template/mail/text/html/global-mail-css.tpl
@@ -2,7 +2,7 @@
body {ldelim} font-family: Univers, Helvetica, Optima; font-size:12px; margin:0px; padding:0px; }
#the_page {ldelim} margin:0px; padding:0px; text-align:left;}
-#content {ldelim} margin:0px; padding:82px 0px 0px 62px; width:732px;}
+#content {ldelim} margin:0px; padding:30px 0px 0px 30px; width:732px;}
hr {ldelim} width:632px; margin-left:0;}
#copyright {ldelim} font-size:10px; margin:0px; padding:48px 0px 32px 62px;}
.PWG {ldelim} font-family:verdana, sans-serif !important; font-size:0.9em; font-weight:normal; letter-spacing:0px;}