aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/template/yoga/admin/configuration.tpl18
-rw-r--r--admin/template/yoga/default-layout.css50
-rw-r--r--admin/template/yoga/theme/admin/theme.css20
-rw-r--r--plugins/SwiftThemeCreator/theme_creator.php115
-rw-r--r--template/yoga/default-layout.css1
5 files changed, 88 insertions, 116 deletions
diff --git a/admin/template/yoga/admin/configuration.tpl b/admin/template/yoga/admin/configuration.tpl
index 633693ec2..3da7f3e4d 100644
--- a/admin/template/yoga/admin/configuration.tpl
+++ b/admin/template/yoga/admin/configuration.tpl
@@ -6,24 +6,24 @@
<form method="post" action="{$F_ACTION}" class="properties">
{if isset($main)}
-<fieldset id="mainConf">
+<fieldset>
<ul>
<li>
- <span class="property">
+ <span class="property m38">
<label for="gallery_title">{'Gallery title'|@translate}</label>
</span>
<input type="text" maxlength="255" size="50" name="gallery_title" id="gallery_title" value="{$main.CONF_GALLERY_TITLE}" />
</li>
<li>
- <span class="property">
+ <span class="property m38">
<label for="page_banner">{'Page banner'|@translate}</label>
</span>
<textarea class="description" name="page_banner" id="page_banner">{$main.CONF_PAGE_BANNER}</textarea>
</li>
<li>
- <span class="property">
+ <span class="property m38">
<label for="gallery_url">{'Gallery URL'|@translate}</label>
</span>
<input type="text" maxlength="255" size="50" name="gallery_url" id="gallery_url" value="{$main.CONF_GALLERY_URL}" />
@@ -31,7 +31,7 @@
</ul>
</fieldset>
-<fieldset id="mainConfCheck">
+<fieldset>
<ul>
<li>
@@ -80,7 +80,7 @@
{/if}
{if isset($history)}
-<fieldset id="historyConf">
+<fieldset>
<ul>
<li>
<label><span class="property">{'conf_history_guest'|@translate}</span><input type="checkbox" name="history_guest" {if ($history.history_guest)}checked="checked"{/if} /></label>
@@ -99,7 +99,7 @@
{if isset($comments)}
-<fieldset id="commentsConf">
+<fieldset>
<ul>
<li>
<label>
@@ -142,7 +142,7 @@
{/if}
{if isset($upload)}
-<fieldset id="uploadConf">
+<fieldset>
<ul>
<li>
<label><span class="property">{'Show upload link every time'|@translate}</span>
@@ -150,7 +150,7 @@
</li>
<li>
<label><span class="property">{'User access level to upload'|@translate}</span>
- {html_options name="upload_user_access" options=$upload.upload_user_access_options selected=$upload.upload_user_access_options_selected}
+ {html_options class="widefield" name="upload_user_access" options=$upload.upload_user_access_options selected=$upload.upload_user_access_options_selected}
</li>
<li>
<label>
diff --git a/admin/template/yoga/default-layout.css b/admin/template/yoga/default-layout.css
index f7e9edb4a..be5c3a131 100644
--- a/admin/template/yoga/default-layout.css
+++ b/admin/template/yoga/default-layout.css
@@ -93,48 +93,13 @@ FORM#categoryPermissions LI {
display:inline;
white-space: nowrap;
}
-
-FIELDSET#mainConfCheck SPAN.property,
-FIELDSET#historyConf SPAN.property,
-FIELDSET#commentsConf SPAN.property,
-FIELDSET#uploadConf SPAN.property {
- float: right;
- text-align: left;
-}
-FIELDSET#mainConfCheck INPUT,
-FIELDSET#historyConf INPUT,
-FIELDSET#commentsConf INPUT,
-FIELDSET#uploadConf INPUT {
- float: none;
-}
-
-FIELDSET#mainConf SPAN.property {
- width: 25%;
+.property {
+ width: 60%;
}
-FIELDSET#mainConf TEXTAREA.description {
+TEXTAREA.description {
width: 70%;
}
-FIELDSET#mainConfCheck SPAN.property,
-FIELDSET#historyConf SPAN.property {
- width: 90%;
-}
-FIELDSET#mainConfCheck INPUT,
-FIELDSET#historyConf INPUT,
-FIELDSET#commentsConf INPUT,
-FIELDSET#uploadConf SELECT,
-FIELDSET#uploadConf INPUT {
- margin-left: 5%;
-}
-
-FIELDSET#commentsConf SPAN.property {
- width: 85%;
-}
-
-FIELDSET#uploadConf SPAN.property {
- width: 75%;
-}
-
.statBar {
height: 10px;
background-color: #66f;
@@ -314,8 +279,8 @@ FORM FIELDSET P {
}
TEXTAREA.description {
- height: 6em;
- width: 40em;
+ height: 12em;
+ width: 60%;
overflow: auto;
}
@@ -423,11 +388,14 @@ FORM.properties LI, FORM#update UL {
FORM.properties SPAN.property {
font-weight: bold;
float: left;
- width: 50%;
+ width: 60%;
text-align: right;
margin: 0;
padding: 0 0.5em 0 0;
}
+.m38 {
+ width: 38% !important;
+}
#theHeader H1 {
margin-bottom: 0.5em;
diff --git a/admin/template/yoga/theme/admin/theme.css b/admin/template/yoga/theme/admin/theme.css
index e4eb6a6d8..af58e8be8 100644
--- a/admin/template/yoga/theme/admin/theme.css
+++ b/admin/template/yoga/theme/admin/theme.css
@@ -64,14 +64,14 @@ a.Piwigo {
a { color:#f70; border-color: #FF3363; }
a:hover { color: #f33; border-color: #FF3363; }
-#theAdminPage h2 { display:block; font-size:28px; letter-spacing:-1px;
+h2 { display:block; font-size:28px; letter-spacing:-1px;
margin:0 20px; height:95px; overflow:hidden; padding:0; position:absolute;
right:0; text-align:right; top:0; width:770px; }
.header_msgs { background-color:transparent; }
.HelpActions a { border:0; margin:4px 14px 0 0; position:absolute; right:0; }
.HelpActions li {list-style-image:none; list-style-position:outside;
list-style-type:none; text-align:center; text-indent:0pt; }
-fieldset#uploadConf input { margin:0 5px 0 110px; width:160px; }
+
table.table2 th { padding:3px 30px; }
table.table2 tr.throw { text-align: center; }
table.table2 { margin:0pt auto; }
@@ -90,7 +90,7 @@ width:136px !important; border: 0; }
.tabsheet a {
background:transparent url(images/inactive_tab.png) no-repeat scroll left 5px;
border: 0 none; color:#777777; display:block; font-size:11px; text-transform:capitalize;
-font-weight:bold; height:33px; overflow:hidden; padding:12px 30px 5px 0; line-height: 18px;
+font-weight:bold; height:28px; overflow:hidden; padding:12px 30px 5px 0; line-height: 18px;
text-align:right; text-decoration:none; width:122px !important; }
.tabsheet a:hover, .tabsheet li.selected_tab a {
background:transparent url(images/active_tab.png) no-repeat scroll left 5px;
@@ -103,25 +103,25 @@ background:transparent url(images/active_tab_letters.png) no-repeat scroll left
/* menubar is on all admin pages => No specific css file */
#menubar {
background:transparent url(images/menuBoxBottom_new.png) no-repeat scroll left bottom;
-border:0; display:inline; float:left; left:0; margin: 0 0 0 35px; min-height:468px;
-padding:0; width:207px; z-index:99; text-align: left; /* "be nice to IE5" rule */ }
-#menubar .selected a { color: #f70; border-color: #f36; }
+border:0; display:inline; float:left; left:0; margin: 0 0 0 35px; min-height:477px; height:477px;
+padding:0; width:207px; z-index:99; text-align: left; }
+#menubar .selected a { color: #f70; border-color: #f36;}
#menubar .selected a:hover { color: #f36; border-bottom: 1px solid #f36;}
#menubar dd {
background: transparent url(images/menubar-detail.png) repeat-y top left;
-margin: 0; padding: 0; height:232px; display:block; }
+margin: 10px 0 0 0; padding: 0; height:232px; }
#menubar dl {
background:transparent url(images/menuBoxTop_new.png) no-repeat scroll left top;
width: 207px; border:0; margin: 0; padding: 0; display: block; min-height:35px; }
-#menubar dl.first {
+#menubar dl.first {
background:transparent url(images/menubar-top.png) no-repeat scroll left 1px; }
#menubar dt { margin: 0; display: block; background: none; left:10px; font-weight:bold;
-position:relative; padding: 5px; top:-10px; font-size: 13px; color: #666; }
+position:relative; padding: 5px 1px 4px 5px; top:-10px; font-size: 13px; color: #666; }
#menubar dt span { background-color: #111; cursor:pointer; }
#menubar a { border-bottom:0; text-decoration:none; font-size: 12px;
color: #F70; border-bottom: 1px dotted #777;}
#menubar li { margin: 0 0 0 6px; }
#menubar li.external { list-style-image:url(images/external_inactive.png); padding:10px 0px 0pt 10px; }
#menubar li.external:hover { list-style-image:url(images/external_active.png); }
-#menubar ul { color: #333; margin:9px 0pt 3px 9px;
+#menubar ul { color: #333; margin:10px 0pt 3px 9px;
list-style-type: square; list-style-position: inside; padding: 0 0 0 2px; }
diff --git a/plugins/SwiftThemeCreator/theme_creator.php b/plugins/SwiftThemeCreator/theme_creator.php
index e520eee27..9d7028640 100644
--- a/plugins/SwiftThemeCreator/theme_creator.php
+++ b/plugins/SwiftThemeCreator/theme_creator.php
@@ -257,13 +257,16 @@ if (!isset($_POST['reset']))
* Header background controls
*/
$main['subphase'] = 'fixed background controls';
+ if (isset($_POST['picture_url'])) $main['picture_url'] = $_POST['picture_url'];
+ if (isset($_POST['background_mode']))
+ $main['background_mode'] = $_POST['background_mode'];
if (isset($_POST['background'])) $main['background'] = $_POST['background'];
// Fixed
- if ( $main['background'] == 'fixed' and isset($_POST['picture_url'])) {
- if ( is_dir($_POST['picture_url'])
- or !is_file($_POST['picture_url']) )
+ if ( $main['background'] == 'fixed') {
+ if ( is_dir($main['picture_url'])
+ or !is_file($main['picture_url']) )
array_push($errors, l10n('Header picture is not found, check its path and name.'));
- $extension = substr($_POST['picture_url'],strrpos($_POST['picture_url'],'.')+1);
+ $extension = substr($main['picture_url'],strrpos($main['picture_url'],'.')+1);
if (!in_array($extension, array('jpg','jpeg','png')))
array_push($errors, l10n('Compliant extensions are .jpg, .jpeg or .png.'));
}
@@ -315,6 +318,19 @@ if (!isset($_POST['reset']))
// | Build files |
// +-----------------------------------------------------------------------+
$main['phase'] = 'Files building';
+if (!function_exists('imagecreatetruecolor') or !function_exists('imagefilter')) {
+ array_push($errors, l10n('Some Php Graphic resources are missing.'
+ . ' Sorry for the inconvenience, but Swift Theme Creator couldn\'t work in such case.'));
+ array_push($infos, l10n('This plugin requires PHP 5.2.5 or later'
+ . ' and compiled against graphic library GD 2.0.1 or later.'));
+ array_push($infos, l10n('On this server, PHP is:'). phpversion());
+ if (function_exists('gd_info')) {
+ $GD = gd_info();
+ array_push($infos, l10n('and graphic library is:').$GD['GD Version']);
+ }
+ else array_push($infos, l10n('graphic library version is not available.'));
+ $main['background'] = 'off';
+}
if ((isset($_POST['submit']) or $main['simulate'] ) and (!is_adviser()))
{
/*
@@ -387,55 +403,54 @@ if ((isset($_POST['submit']) or $main['simulate'] ) and (!is_adviser()))
AND ic.image_id = i.id
ORDER BY RAND(' . $main['random'] . ')
LIMIT 0,1');
- if($result) list($main['pic_path']) = mysql_fetch_array($result);
- else $main['pic_path'] =
- PHPWG_ROOT_PATH . 'plugins/SwiftThemeCreator/simul/header.jpg';
- $main['pic_ext'] = substr($main['pic_path'],strrpos($main['pic_path'],'.')+1);
- if ($main['pic_ext']=='png')
- $img = imagecreatefrompng($main['pic_path']);
- elseif (in_array($main['pic_ext'],array('jpg','jpeg')))
- $img = imagecreatefromjpeg($main['pic_path']);
- else $img = imagecreatefromjpeg(PHPWG_ROOT_PATH
- . 'plugins/SwiftThemeCreator/simul/header.jpg');
- imagejpeg( $img, $themedir . '/header.jpg', 90 );
- imagedestroy ($img);
+ if($result) list($main['pic_path']) = mysql_fetch_array($result);
+ else $main['pic_path'] =
+ PHPWG_ROOT_PATH . 'plugins/SwiftThemeCreator/simul/header.jpg';
+ $main['pic_ext'] = substr($main['pic_path'],strrpos($main['pic_path'],'.')+1);
+ if ($main['pic_ext']=='png')
+ $img = imagecreatefrompng($main['pic_path']);
+ elseif (in_array($main['pic_ext'],array('jpg','jpeg')))
+ $img = imagecreatefromjpeg($main['pic_path']);
+ else $img = imagecreatefromjpeg(PHPWG_ROOT_PATH
+ . 'plugins/SwiftThemeCreator/simul/header.jpg');
+ imagejpeg( $img, $themedir . '/header.jpg', 90 );
+ imagedestroy ($img);
}
if (isset($_POST['background']) and $_POST['background'] == 'fixed')
{
- if (function_exists('imagecreatefromjpeg'))
- {
- $hdr = imagecreatetruecolor ($main['picture_width'], $main['picture_height']);
- imagecolorset ( $hdr, 0, $r2, $g2, $b2 );
- if ($extension == 'png') $img = imagecreatefrompng($_POST['picture_url']);
- else $img = imagecreatefromjpeg($_POST['picture_url']);
- imagecopymerge ( $hdr, $img, 0, 0, 0, 0, $main['picture_width'], $main['picture_height'], 60 );
- imagedestroy ($img);
- if ($main['colorize']) imagefilter($hdr, IMG_FILTER_COLORIZE, $r, $g, $b);
- if ($main['brightness']) imagefilter($hdr, IMG_FILTER_BRIGHTNESS, $delta);
- if ($main['contrast']) imagefilter($hdr, IMG_FILTER_CONTRAST, 20);
- imagejpeg( $hdr, $themedir . '/header.jpg', 90 );
- imagedestroy ($hdr);
- }
- else @copy( $_POST['picture_url'], $themedir . '/header.jpg');
- }
- /*
- * Build background image for titrePage or definition list (in #menubar)
- **/
- if (function_exists('imagecreatefrompng'))
- {
- $hdr = imagecreatetruecolor (1, 38);
+ $main['subphase'] = 'Fixed background';
+ $hdr = imagecreatetruecolor ($main['picture_width'], $main['picture_height']);
imagecolorset ( $hdr, 0, $r2, $g2, $b2 );
- $img = imagecreatefrompng(STC_PATH . '/titrePage-bg.png');
- imagecopymerge ( $hdr, $img, 0, 0, 0, 0, 1, 38, 60 );
+ if ($extension == 'png') $img = imagecreatefrompng($main['picture_url']);
+ else $img = imagecreatefromjpeg($main['picture_url']);
+ imagecopymerge ( $hdr, $img, 0, 0, 0, 0, $main['picture_width'], $main['picture_height'], 60 );
imagedestroy ($img);
if ($main['colorize']) imagefilter($hdr, IMG_FILTER_COLORIZE, $r, $g, $b);
if ($main['brightness']) imagefilter($hdr, IMG_FILTER_BRIGHTNESS, $delta);
if ($main['contrast']) imagefilter($hdr, IMG_FILTER_CONTRAST, 20);
- imagepng( $hdr, $themedir . '/stc.png', 9 );
- imagedestroy ($hdr);
+ imagejpeg( $hdr, $themedir . '/header.jpg', 90 );
+ imagedestroy ($hdr);
}
- else @copy( STC_PATH
- . '/titrePage-bg.png', $themedir . '/stc.png');
+ /*
+ * Build background image for titrePage or definition list (in #menubar)
+ **/
+ $main['subphase'] = 'Headbars background';
+ $hdr = imagecreatetruecolor (1, 38);
+ imagecolorset ( $hdr, 0, $r2, $g2, $b2 );
+ $img = imagecreatefrompng(STC_PATH . '/titrePage-bg.png');
+ imagecopymerge ( $hdr, $img, 0, 0, 0, 0, 1, 38, 60 );
+ imagedestroy ($img);
+ if ($main['colorize']) imagefilter($hdr, IMG_FILTER_COLORIZE, $r, $g, $b);
+ if ($main['brightness']) imagefilter($hdr, IMG_FILTER_BRIGHTNESS, $delta);
+ if ($main['contrast']) imagefilter($hdr, IMG_FILTER_CONTRAST, 20);
+ imagepng( $hdr, $themedir . '/stc.png', 9 );
+ imagedestroy ($hdr);
+
+ /*
+ * Errors and cleaning or Congratulations
+ **/
+ $main['phase'] = 'Congratulation';
+ $main['subphase'] = 'cleaning';
if ($rfs == false) {
array_push($errors,
l10n('Theme files creation failure: theme should be deleted.'));
@@ -507,18 +522,6 @@ $template->assign('background_options',
'random' => l10n('24H Random'),
'fixed' => l10n('Fixed URL'),
));
-$main['picture_url'] = PHPWG_ROOT_PATH . 'plugins/SwiftThemeCreator/sample.jpg';
-if (isset($swift_theme_creator->picture_url))
- $main['picture_url'] = $swift_theme_creator->picture_url;
-if (isset($_POST['picture_url'])) $main['picture_url'] = $_POST['picture_url'];
-
-if (isset($_POST['picture_width']))
- $main['picture_width'] = $_POST['picture_width'];
-if (isset($_POST['picture_height']))
- $main['picture_height'] = $_POST['picture_height'];
-
-if (isset($_POST['background_mode']))
- $main['background_mode'] = $_POST['background_mode'];
$template->assign('background_mode_options',
array(
'as' => l10n('As is'),
diff --git a/template/yoga/default-layout.css b/template/yoga/default-layout.css
index 7ae9c4ead..6c2981411 100644
--- a/template/yoga/default-layout.css
+++ b/template/yoga/default-layout.css
@@ -273,3 +273,4 @@ TABLE.tagLetterContent {
font-size:80%;
border-collapse : collapse;
}
+#theHeader {text-align: center;} \ No newline at end of file