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
This commit is contained in:
vdigital
2008-07-23 06:21:59 +00:00
parent cde423fc86
commit 49f337a9d8
3 changed files with 32 additions and 6 deletions
+18
View File
@@ -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}; }
+13 -5
View File
@@ -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();
?>
?>