aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/SwiftThemeCreator
diff options
context:
space:
mode:
authorvdigital <vdigital@piwigo.org>2008-07-23 06:21:59 +0000
committervdigital <vdigital@piwigo.org>2008-07-23 06:21:59 +0000
commit49f337a9d8964f8ecd3c8c5eb75601ba9635df13 (patch)
tree30dc908c5c523932b1b695e349baaa17165a02bb /plugins/SwiftThemeCreator
parentcde423fc86a8aaa6054179ca17e534f53df1a422 (diff)
Swift Theme Creator (minor changes): non functional version yet (4).
Bug 836: "Extend for templates" minor change. git-svn-id: http://piwigo.org/svn/trunk@2453 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--plugins/SwiftThemeCreator/mail-css.tpl218
-rw-r--r--plugins/SwiftThemeCreator/theme_creator.php18
2 files changed, 31 insertions, 5 deletions
diff --git a/plugins/SwiftThemeCreator/mail-css.tpl2 b/plugins/SwiftThemeCreator/mail-css.tpl2
new file mode 100644
index 000000000..6bb63509c
--- /dev/null
+++ b/plugins/SwiftThemeCreator/mail-css.tpl2
@@ -0,0 +1,18 @@
+/* Theme {$main.newtheme} mail css */
+
+body {$main.ldelim} background-color:{$main.colour1}; color:{$main.colour2};}
+#the_page {$main.ldelim} background: {$main.colour1} url({ldelim}$ROOT_URL}template/{ldelim}$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
+#content {$main.ldelim} background: transparent url({ldelim}$ROOT_URL}template/{ldelim}$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
+#copyright {$main.ldelim} background: transparent url({ldelim}$ROOT_URL}template/{ldelim}$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
+color: {$main.colour2};}
+h2 {$main.ldelim} background-color: {$main.colour7};color:#eee;background-image: url({ldelim}$ROOT_URL}template/{ldelim}$themeconf.template}/theme/{ldelim}$themeconf.theme}/images/tableh1_bg.png);}
+img {$main.ldelim} margin: 16px; padding:15px;border:1px solid #eee; -moz-border-radius: 4px; border-radius: 4px 4px; }
+img:hover {$main.ldelim} border:1px solid {$main.colour2}; -moz-border-radius: 4px; border-radius: 4px 4px; }
+a {$main.ldelim} color: {$main.colour2}; background: transparent; }
+a:hover {$main.ldelim} color: {$main.colour3}; }
+a.PWG {$main.ldelim} border: 0px; }
+a.PWG .P {$main.ldelim} color : {$main.colour3}; }
+a.PWG .W {$main.ldelim} color : {$main.colour5}; }
+a.PWG .G {$main.ldelim} color : {$main.colour2}; }
+a.PWG:hover .P {$main.ldelim} color : {$main.colour2}; }
+a.PWG:hover .G {$main.ldelim} color : {$main.colour3}; }
diff --git a/plugins/SwiftThemeCreator/theme_creator.php b/plugins/SwiftThemeCreator/theme_creator.php
index 860b45097..1c9f0d9df 100644
--- a/plugins/SwiftThemeCreator/theme_creator.php
+++ b/plugins/SwiftThemeCreator/theme_creator.php
@@ -175,10 +175,6 @@ if (isset($_POST['submit']) and (!is_adviser()))
if ((( (($r1+1)/256)*(($g1+1)/256)*(($b1+1)/256) ) * 1000 ) < 125 )
$main['color7'] = lighten( $r1, $g1, $b1, 10);
else $main['color7'] = darken( $r1, $g1, $b1, 10);
-
- /* en gros reste à faire:
- * creation des différents fichiers
- */
// Go ahead
if (count($errors) == 0) {
@@ -189,6 +185,7 @@ if (isset($_POST['submit']) and (!is_adviser()))
l10n('Theme directory creation failure: it can\'t be created (for now en attendant la suite 8-) ).'));
}
+ $main['ldelim'] = '{ldelim}';
/*
* Build themeconf.inc.php
**/
@@ -197,6 +194,13 @@ if (isset($_POST['submit']) and (!is_adviser()))
dirname(__FILE__) . '/themeconf.inc.tpl'));
$plugin_tpl->assign('main',$main);
$main['themeconf_inc_php'] = $plugin_tpl->parse('themeconf', true);
+ /*
+ * Build mail-css.tpl
+ **/
+ $plugin_tpl->set_filenames(array('mailcss'=>
+ dirname(__FILE__) . '/mail-css.tpl2'));
+ $plugin_tpl->assign('main',$main);
+ $main['mail-css.tpl'] = $plugin_tpl->parse('mailcss', true);
// Smarty trace
$plugin_tpl->assign('main',$main);
@@ -229,6 +233,10 @@ if (isset($_POST['submit']) and (!is_adviser()))
imagedestroy ($dest);
}
+
+ /* All logic is there
+ * On "todo" : Create files and uncomment some previous statements.
+ */
$swift_theme_creator->save_theme_config();
@@ -318,4 +326,4 @@ $template->assign('main', $main);
$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
$swift_theme_creator->theme_config = $main;
$swift_theme_creator->save_theme_config();
-?> \ No newline at end of file
+?>