feature 1502: based on Dotclear model, P@t has reorganized the way Piwigo

manages template/theme in a simpler "theme only level" architecture. It
supports multiple level inheritance.

git-svn-id: http://piwigo.org/svn/trunk@5123 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2010-03-13 00:00:52 +00:00
parent c396f08708
commit 14778ce673
615 changed files with 652 additions and 648 deletions
+4 -4
View File
@@ -62,26 +62,26 @@ SELECT
// theme changer
if (isset($_GET['change_theme']))
{
$admin_themes = array('goto/roma', 'goto/clear');
$admin_themes = array('roma', 'clear');
$new_admin_theme = array_pop(
array_diff(
$admin_themes,
array($conf['admin_layout'])
array($conf['admin_theme'])
)
);
$query = '
DELETE
FROM '.CONFIG_TABLE.'
WHERE param = "admin_layout"
WHERE param = "admin_theme"
;';
pwg_query($query);
$query = '
INSERT
INTO '.CONFIG_TABLE.'
SET param = "admin_layout"
SET param = "admin_theme"
, value = "'.$new_admin_theme.'"
;';
pwg_query($query);
+1 -1
View File
@@ -111,7 +111,7 @@ $flip_templates = array_flip($eligible_templates);
$available_templates = array_merge(
array('N/A' => '----------'),
get_dirs(PHPWG_ROOT_PATH.'template'));
get_dirs(PHPWG_ROOT_PATH.'theme'));
// +-----------------------------------------------------------------------+
// | selected templates |
@@ -256,11 +256,8 @@ function set_user_on_env_nbm(&$nbm_user, $is_action_send)
if ($is_action_send)
{
$nbm_user['template'] = $user['template'];
$nbm_user['theme'] = $user['theme'];
$env_nbm['mail_template'] =
get_mail_template($env_nbm['email_format'],
array('template' => $nbm_user['template'], 'theme' => $nbm_user['theme']));
$env_nbm['mail_template'] = get_mail_template($env_nbm['email_format'], $nbm_user['theme']);
$env_nbm['mail_template']->set_filename('notification_by_mail', 'notification_by_mail.tpl');
}
}
@@ -435,7 +432,6 @@ function do_subscribe_unsubscribe_notification_by_mail($is_admin_request, $is_su
'email_format' => $env_nbm['email_format'],
'content' => $env_nbm['mail_template']->parse('notification_by_mail', true),
'content_format' => $env_nbm['email_format'],
'template' => $nbm_user['template'],
'theme' => $nbm_user['theme']
)
))
-86
View File
@@ -1,86 +0,0 @@
{*
Warning : This is the admin pages header only
don't confuse with the public page header
*}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$CONTENT_ENCODING}">
<meta name="generator" content="Piwigo (aka PWG), see piwigo.org">
<title>{$GALLERY_TITLE} :: {$PAGE_TITLE}</title>
<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}template-common/favicon.ico">
<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/layout.css">
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/fix-ie5-ie6.css">
<![endif]-->
<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/default-colors.css">
<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/theme/{$themeconf.theme}/theme.css">
{known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js" now=1} {*jQuery is always available by default*}
{$themeconf.local_head}
<script type="text/javascript" src="{$ROOT_URL}template-common/scripts.js"></script>
<!--[if lt IE 7]>
<style>
{* only because we need {$ROOT_URL} otherwise use fix-ie5-ie6.css *}
BODY {ldelim} behavior:url("{$ROOT_URL}template-common/csshover.htc"); }
A IMG, .button, .icon {ldelim}
behavior:url("{$ROOT_URL}template-common/tooltipfix.htc");
}
FORM {ldelim} behavior: url("{$ROOT_URL}template-common/inputfix.htc"); }
</style>
<script type="text/javascript" src="{$ROOT_URL}template-common/pngfix.js"></script>
<![endif]-->
{if not empty($head_elements)}
{foreach from=$head_elements item=elt}
{$elt}
{/foreach}
{/if}
</head>
<body id="{$BODY_ID}">
<div id="the_page">
<div id="pwgHead">
<h1>
<a href="{$U_RETURN}" title="Visit Gallery">
<img src="admin/template/goto/icon/home.png" alt="{'Home'|@translate}">
{$GALLERY_TITLE}
</a>
</h1>
<div id="headActions">
Hello {$USERNAME} :
<a href="{$U_RETURN}" title="Visit Gallery">Visit Gallery</a> |
<a href="{$U_CHANGE_THEME}" title="Switch to clear theme for administration">Change Theme</a> |
<a href="{$U_LOGOUT}">{'Logout'|@translate}</a>
<a href="{$U_FAQ}" title="{'Instructions'|@translate}" id="instructions"><img style="padding-left:10px;" src="{$ROOT_URL}admin/template/goto/icon/help.png" class="button" alt="(?)"></a>
</div>
</div>
<div style="clear:both;"></div>
{if not empty($header_msgs)}
<div class="header_msgs">
{foreach from=$header_msgs item=elt}
{$elt}
{/foreach}
</div>
{/if}
<div id="theHeader">{*$PAGE_BANNER*}</div>
{if not empty($header_notes)}
<div class="header_notes">
{foreach from=$header_notes item=elt}
{$elt}
{/foreach}
</div>
{/if}
<div id="pwgMain">
@@ -1,24 +0,0 @@
{known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"}
{known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.core.packed.js"}
{known_script id="jquery.ui.datepicker" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.datepicker.packed.js"}
{known_script id="datepicker.js" src=$ROOT_URL|@cat:"template-common/datepicker.js"}
{assign var="datepicker_language" value="template-common/lib/ui/i18n/ui.datepicker-"|@cat:$lang_info.code|@cat:".js"}
{if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists}
{known_script id="jquery.ui.datepicker-$lang_info.code" src=$ROOT_URL|@cat:$datepicker_language}
{/if}
{html_head}
<link rel="stylesheet" type="text/css" href="{$ROOT_URL}template-common/lib/ui/theme/ui.datepicker.css">
{/html_head}
<script type="text/javascript">
function pwg_initialization_datepicker(day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date)
{ldelim}
return pwg_common_initialization_datepicker(
"{$ROOT_URL}admin/template/{$themeconf.template}/icon/datepicker.png",
day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date);
}
</script>
@@ -1,15 +0,0 @@
<?php
if (!function_exists('selected_admin_menu'))
{
include_once(PHPWG_ROOT_PATH.'admin/include/functions_themes.inc.php');
}
$themeconf = array(
'template' => 'goto',
'theme' => 'clear',
'icon_dir' => 'template/yoga/icon',
'admin_icon_dir' => 'admin/template/goto/theme/clear/icon',
'mime_icon_dir' => 'template/yoga/icon/mimetypes',
'selected_admin_menu' => selected_admin_menu(),
'local_head' => '',
);
?>
@@ -1,15 +0,0 @@
<?php
if (!function_exists('selected_admin_menu'))
{
include_once(PHPWG_ROOT_PATH.'admin/include/functions_themes.inc.php');
}
$themeconf = array(
'template' => 'goto', /* Goto Admin template */
'theme' => 'roma', /* "roma" is the foundation theme of Piwigo */
'icon_dir' => 'template/yoga/icon',
'admin_icon_dir' => 'admin/template/goto/icon',
'mime_icon_dir' => 'template/yoga/icon/mimetypes/',
'selected_admin_menu' => selected_admin_menu(),
'local_head' => '',
);
?>

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 515 B

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 367 B

Before

Width:  |  Height:  |  Size: 878 B

After

Width:  |  Height:  |  Size: 878 B

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 475 B

Before

Width:  |  Height:  |  Size: 778 B

After

Width:  |  Height:  |  Size: 778 B

Before

Width:  |  Height:  |  Size: 585 B

After

Width:  |  Height:  |  Size: 585 B

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 900 B

After

Width:  |  Height:  |  Size: 900 B

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 536 B

After

Width:  |  Height:  |  Size: 536 B

Before

Width:  |  Height:  |  Size: 555 B

After

Width:  |  Height:  |  Size: 555 B

Before

Width:  |  Height:  |  Size: 373 B

After

Width:  |  Height:  |  Size: 373 B

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 410 B

Before

Width:  |  Height:  |  Size: 364 B

After

Width:  |  Height:  |  Size: 364 B

Before

Width:  |  Height:  |  Size: 441 B

After

Width:  |  Height:  |  Size: 441 B

Before

Width:  |  Height:  |  Size: 371 B

After

Width:  |  Height:  |  Size: 371 B

Before

Width:  |  Height:  |  Size: 386 B

After

Width:  |  Height:  |  Size: 386 B

Before

Width:  |  Height:  |  Size: 386 B

After

Width:  |  Height:  |  Size: 386 B

Before

Width:  |  Height:  |  Size: 386 B

After

Width:  |  Height:  |  Size: 386 B

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 344 B

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 363 B

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 135 B

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 134 B

Before

Width:  |  Height:  |  Size: 714 B

After

Width:  |  Height:  |  Size: 714 B

Before

Width:  |  Height:  |  Size: 423 B

After

Width:  |  Height:  |  Size: 423 B

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 421 B

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 624 B

After

Width:  |  Height:  |  Size: 624 B

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 315 B

Before

Width:  |  Height:  |  Size: 796 B

After

Width:  |  Height:  |  Size: 796 B

Before

Width:  |  Height:  |  Size: 571 B

After

Width:  |  Height:  |  Size: 571 B

Before

Width:  |  Height:  |  Size: 578 B

After

Width:  |  Height:  |  Size: 578 B

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Before

Width:  |  Height:  |  Size: 928 B

After

Width:  |  Height:  |  Size: 928 B

Before

Width:  |  Height:  |  Size: 905 B

After

Width:  |  Height:  |  Size: 905 B

Before

Width:  |  Height:  |  Size: 871 B

After

Width:  |  Height:  |  Size: 871 B

Before

Width:  |  Height:  |  Size: 869 B

After

Width:  |  Height:  |  Size: 869 B

Before

Width:  |  Height:  |  Size: 902 B

After

Width:  |  Height:  |  Size: 902 B

Before

Width:  |  Height:  |  Size: 869 B

After

Width:  |  Height:  |  Size: 869 B

Before

Width:  |  Height:  |  Size: 870 B

After

Width:  |  Height:  |  Size: 870 B

Before

Width:  |  Height:  |  Size: 912 B

After

Width:  |  Height:  |  Size: 912 B

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

@@ -6,7 +6,7 @@ body {ldelim} background-color:#111; color:#69c;}
#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
color: #69c;}
h2 {ldelim} background-color: #222;color:#eee;background-image: url({$ROOT_URL}template/{$themeconf.template}/theme/{$themeconf.theme}/images/tableh1_bg.png);}
h2 {ldelim} background-color: #222;color:#eee;background-image: url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/tableh1_bg.png);}
img {ldelim} margin: 16px; padding:15px;border:1px solid #eee; -moz-border-radius: 4px; border-radius: 4px 4px; }
img:hover {ldelim} border:1px solid #69c; -moz-border-radius: 4px; border-radius: 4px 4px; }
a {ldelim} color: #69c; background: transparent; }
+12
View File
@@ -0,0 +1,12 @@
<?php
if (!function_exists('selected_admin_menu'))
{
include_once(PHPWG_ROOT_PATH.'admin/include/functions_themes.inc.php');
}
$themeconf = array(
'theme' => 'clear',
'parent' => 'default',
'admin_icon_dir' => 'admin/themes/clear/icon',
'selected_admin_menu' => selected_admin_menu(),
);
?>
@@ -695,4 +695,44 @@ html, body {height:100%; margin:0; padding:0;}
#tiptip_holder.tip_top #tiptip_arrow_inner {
border-top-color: rgba(20,20,20,0.92);
}
}
/* Set the width of the menubar for the galery */
#menubar {
width: 18em;
}
.content {
margin-left: 20em; /* = #menubar width + 2em */
}
/* Set minimum width of the page before getting a scrollbar */
/* IE5 and IE6 don't get that */
BODY {
min-width: 60em; /* ~ 3* #menubar width */
}
BODY#thePopuphelpPage {
min-width: 0;
}
/* Set some sizes according to your maximum thumbnail width and height */
.content UL.thumbnails SPAN,
.content UL.thumbnails SPAN.wrap2 A,
.content UL.thumbnails LABEL,
.content DIV.thumbnailCategory DIV.illustration {
width: 140px; /* max thumbnail width + 2px */
}
.content UL.thumbnails SPAN.wrap2,
.content DIV.thumbnailCategory DIV.description {
height: 140px; /* max thumbnail height + 2px */
}
/* Category thumbnails on main page */
.content UL.thumbnailCategories LI {
width: 49.7%; /* 49.7% for 2 per line, 33.2% for 3 per line*/
}
/* Set defaults for thumbnails legend */
.content UL.thumbnails SPAN.thumbLegend {
display: block; /* display: none; if you don't want legend */
height: 4em; /* legend height (don't set auto to be Gecko friendly)*/
}

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 581 B

Before

Width:  |  Height:  |  Size: 962 B

After

Width:  |  Height:  |  Size: 962 B

Before

Width:  |  Height:  |  Size: 960 B

After

Width:  |  Height:  |  Size: 960 B

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Before

Width:  |  Height:  |  Size: 942 B

After

Width:  |  Height:  |  Size: 942 B

Before

Width:  |  Height:  |  Size: 960 B

After

Width:  |  Height:  |  Size: 960 B

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before

Width:  |  Height:  |  Size: 510 B

After

Width:  |  Height:  |  Size: 510 B

Before

Width:  |  Height:  |  Size: 517 B

After

Width:  |  Height:  |  Size: 517 B

Before

Width:  |  Height:  |  Size: 425 B

After

Width:  |  Height:  |  Size: 425 B

Before

Width:  |  Height:  |  Size: 817 B

After

Width:  |  Height:  |  Size: 817 B

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 816 B

After

Width:  |  Height:  |  Size: 816 B

Before

Width:  |  Height:  |  Size: 90 B

After

Width:  |  Height:  |  Size: 90 B

Before

Width:  |  Height:  |  Size: 774 B

After

Width:  |  Height:  |  Size: 774 B

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 726 B

Before

Width:  |  Height:  |  Size: 701 B

After

Width:  |  Height:  |  Size: 701 B

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 777 B

After

Width:  |  Height:  |  Size: 777 B

Before

Width:  |  Height:  |  Size: 482 B

After

Width:  |  Height:  |  Size: 482 B

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 421 B

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 432 B

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 388 B

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 475 B

Before

Width:  |  Height:  |  Size: 399 B

After

Width:  |  Height:  |  Size: 399 B

Before

Width:  |  Height:  |  Size: 425 B

After

Width:  |  Height:  |  Size: 425 B

Some files were not shown because too many files have changed in this diff Show More