merge spread_menus to the core

git-svn-id: http://piwigo.org/svn/trunk@10812 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
mistic100 2011-05-07 15:55:10 +00:00
parent 0cbac27ddb
commit fdfe41e343
32 changed files with 191 additions and 67 deletions

View file

@ -36,7 +36,6 @@ check_status(ACCESS_GUEST);
//
$title= l10n('About Piwigo');
$page['body_id'] = 'theAboutPage';
include(PHPWG_ROOT_PATH.'include/page_header.php');
trigger_action('loc_begin_about');
@ -50,6 +49,14 @@ if ( $theme_about !== false )
$template->assign('THEME_ABOUT', $theme_about);
}
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['Exclude']) OR !in_array('theAboutPage', $themeconf['Exclude']))
{
include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
}
include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->pparse('about');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>

View file

@ -84,6 +84,7 @@ $display_checkboxes = array(
'picture_download_icon',
'picture_navigation_icons',
'picture_navigation_thumb',
'picture_menu',
);
$display_info_checkboxes = array(

View file

@ -285,6 +285,13 @@
<input type="checkbox" name="picture_navigation_thumb" {if ($display.picture_navigation_thumb)}checked="checked"{/if}>
</label>
</li>
<li>
<label>
<span class="property">{'Show menubar'|@translate}</span>
<input type="checkbox" name="picture_menu" {if ($display.picture_menu)}checked="checked"{/if}>
</label>
</li>
</ul>
</fieldset>

View file

@ -527,6 +527,14 @@ SELECT c.id, name, permalink, uppercats, com.id as comment_id
$template->append('comments', $tpl_comment);
}
}
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['Exclude']) OR !in_array('theCommentsPage', $themeconf['Exclude']))
{
include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
}
// +-----------------------------------------------------------------------+
// | html code display |
// +-----------------------------------------------------------------------+

View file

@ -73,7 +73,6 @@ if (isset($_POST['login']))
//
$title = l10n('Identification');
$page['body_id'] = 'theIdentificationPage';
include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->set_filenames( array('identification'=>'identification.tpl') );
@ -97,7 +96,15 @@ if ( sizeof( $errors ) != 0 )
$template->assign('errors', $errors);
}
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['Exclude']) OR !in_array('theIdentificationPage', $themeconf['Exclude']))
{
include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
}
//----------------------------------------------------------- html code display
include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->pparse('identification');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>

View file

@ -42,6 +42,7 @@ INSERT INTO piwigo_config (param,value,comment) VALUES ('picture_favorite_icon',
INSERT INTO piwigo_config (param,value,comment) VALUES ('picture_download_icon','true','Display download icon on picture page');
INSERT INTO piwigo_config (param,value,comment) VALUES ('picture_navigation_icons','true','Display navigation icons on picture page');
INSERT INTO piwigo_config (param,value,comment) VALUES ('picture_navigation_thumb','true','Display navigation thumbnails on picture page');
INSERT INTO piwigo_config (param,value,comment) VALUES ('picture_menu','false','Show menubar on picture page');
INSERT INTO piwigo_config (param,value,comment)
VALUES (
'picture_informations',

View file

@ -0,0 +1,42 @@
<?php
// +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
// | Copyright(C) 2008-2011 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. |
// +-----------------------------------------------------------------------+
if (!defined('PHPWG_ROOT_PATH'))
{
die('Hacking attempt!');
}
$upgrade_description = 'Show menubar on picture page';
$query = '
INSERT INTO '.PREFIX_TABLE.'config (param,value,comment)
VALUES (\'picture_menu\',\'false\', \''.$upgrade_description.'\')
;';
pwg_query($query);
echo
"\n"
. $upgrade_description
."\n"
;
?>

View file

@ -605,6 +605,7 @@ $lang['Set title'] = 'Set title';
$lang['set to'] = "set to";
$lang['Settings'] = 'Settings';
$lang['Show info'] = "Show info";
$lang['Show menubar'] = "Show menubar";
$lang['Simulation'] = "Simulation";
$lang['singly represented'] = "fixed representative";
$lang['Site manager'] = "Site manager";

View file

@ -799,4 +799,5 @@ $lang['Compact'] = "Compact";
$lang['Complete'] = "Complet";
$lang['Restore'] = "Restaurer";
$lang['Restore default configuration. You will lost your plugin settings!'] = "Restaurer la configuration par défaut? Vous perdrez vos réglages personnels !";
$lang['Show menubar'] = "Afficher le menu";
?>

View file

@ -841,4 +841,5 @@ $lang['Height'] = 'Hauteur';
$lang['Follow Orientation'] = "Respecter l'orientation";
$lang['If you want to regenerate thumbnails, please go to the <a href="%s">Batch Manager</a>.'] = 'Si vous voulez régénérer des miniatures, merci de vous rendre dans la <a href="%s">Gestion par lot</a>.';
$lang['Graphics Library'] = 'Bibliothèque graphique';
$lang['Show menubar'] = "Afficher le menu";
?>

View file

@ -65,7 +65,6 @@ else
// +-----------------------------------------------------------------------+
$title = l10n('Notification');
$page['body_id'] = 'theNBMPage';
include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->set_filenames(array('nbm'=>'nbm.tpl'));
@ -78,10 +77,18 @@ $template->assign(
'infos' => $page['infos'],
)
);
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['Exclude']) OR !in_array('theNBMPage', $themeconf['Exclude']))
{
include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
}
// +-----------------------------------------------------------------------+
// | html code display |
// +-----------------------------------------------------------------------+
include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->parse('nbm');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>

View file

@ -77,6 +77,13 @@ $template->assign(
'U_FEED_IMAGE_ONLY' => $feed_image_only_url,
)
);
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['Exclude']) OR !in_array('theNotificationPage', $themeconf['Exclude']))
{
include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
}
// +-----------------------------------------------------------------------+
// | html code display |

View file

@ -153,6 +153,13 @@ $template->assign( array(
$template->assign('errors', $page['errors']);
$template->assign('infos', $page['infos']);
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['Exclude']) OR !in_array('thePasswordPage', $themeconf['Exclude']))
{
include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
}
// +-----------------------------------------------------------------------+
// | html code display |
// +-----------------------------------------------------------------------+

View file

@ -1040,6 +1040,14 @@ if ($metadata_showable and pwg_get_session_var('show_metadata') <> null )
include(PHPWG_ROOT_PATH.'include/picture_metadata.inc.php');
}
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if ($conf['picture_menu'] AND (!isset($themeconf['Exclude']) OR !in_array('theIdentificationPage', $themeconf['Exclude'])))
{
include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
$template->assign('U_ADMIN', $url_admin); // overwrited by the menu
}
include(PHPWG_ROOT_PATH.'include/page_header.php');
trigger_action('loc_end_picture');
if ($page['slideshow'] and $conf['light_slideshow'])

View file

@ -68,7 +68,7 @@ SELECT '.implode(',', $fields).'
$title= l10n('Your Gallery Customization');
$page['body_id'] = 'theProfilePage';
include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->set_filename('profile', 'profile.tpl');
load_profile_in_template(
get_root_url().'profile.php', // action
@ -82,7 +82,15 @@ SELECT '.implode(',', $fields).'
{
$template->assign('errors', $errors);
}
$template->set_filename('profile', 'profile.tpl');
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['Exclude']) OR !in_array('theProfilePage', $themeconf['Exclude']))
{
include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
}
include(PHPWG_ROOT_PATH.'include/page_header.php');
trigger_action('loc_end_profile');
$template->pparse('profile');
include(PHPWG_ROOT_PATH.'include/page_tail.php');

View file

@ -80,7 +80,6 @@ $email = !empty($_POST['mail_address'])?htmlspecialchars(stripslashes($_POST['ma
//
$title= l10n('Registration');
$page['body_id'] = 'theRegisterPage';
include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->set_filenames( array('register'=>'register.tpl') );
$template->assign(array(
@ -97,6 +96,14 @@ if (count($errors) != 0)
$template->assign('errors', $errors);
}
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['Exclude']) OR !in_array('theRegisterPage', $themeconf['Exclude']))
{
include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
}
include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->parse('register');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>

View file

@ -227,7 +227,15 @@ if (sizeof($errors) != 0)
{
$template->assign('errors', $errors);
}
//------------------------------------------------------------ log informations
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['Exclude']) OR !in_array('theSearchPage', $themeconf['Exclude']))
{
include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
}
//------------------------------------------------------------ html code display
include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->pparse('search');
include(PHPWG_ROOT_PATH.'include/page_tail.php');

View file

@ -191,6 +191,13 @@ foreach ($tags as $tag)
);
}
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['Exclude']) OR !in_array('theTagsPage', $themeconf['Exclude']))
{
include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
}
include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->pparse('tags');
include(PHPWG_ROOT_PATH.'include/page_tail.php');

View file

@ -141,6 +141,10 @@
.content {
background:#222 url(images/fillet.gif) repeat-x scroll left top;
min-height:466px;
border: 1px solid #000;
border-top: 0;
margin:21px 7px 0 290px !important;
padding-top:7px;
}
#the_page {
@ -155,13 +159,6 @@
min-width: 100%;
}
#theCategoryPage .content {
border: 1px solid #000;
border-top: 0;
margin:21px 7px 0 290px !important;
padding-top:7px;
}
.content h2 {
margin:0;
padding:0px 10px 15px 15px;
@ -362,6 +359,10 @@
border-top:0 !important;
}
.pictureContent {
margin:0 7px 7px 290px;
}
#addComment fieldset {
color: #f70;
border-color: #f70;

View file

@ -6,4 +6,6 @@
<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/fix-ie7.css">
<![endif]-->
{combine_css path="themes/default/print.css" order=-10}
{/if}
{/if}
{if !isset($MENUBAR)}<style type="text/css">.content {ldelim} margin-left:auto !important; }</style>{/if}

View file

@ -1,10 +1,7 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div class="titrePage">
<ul class="categoryActions">
<li><a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
</a></li>
</ul>
<ul class="categoryActions"></ul>
<h2>{'About'|@translate}</h2>
</div>
<div id="piwigoAbout">

View file

@ -1,11 +1,8 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div class="titrePage">
<ul class="categoryActions">
<li><a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
</a></li>
</ul>
<ul class="categoryActions"></ul>
<h2>{'User comments'|@translate}</h2>
</div>

View file

@ -1,11 +1,8 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div class="titrePage">
<ul class="categoryActions">
<li><a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
</a></li>
</ul>
<ul class="categoryActions"></ul>
<h2>{'Identification'|@translate}</h2>
</div>

View file

@ -1,11 +1,7 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div class="titrePage">
<ul class="categoryActions">
<li><a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
</a></li>
</ul>
<ul class="categoryActions"></ul>
<h2>{'Notification'|@translate}</h2>
</div>

View file

@ -2,14 +2,12 @@
<link rel="alternate" type="application/rss+xml" title="{'Photos only RSS feed'|@translate}" href="{$U_FEED_IMAGE_ONLY}">
<link rel="alternate" type="application/rss+xml" title="{'Complete RSS feed (photos, comments)'|@translate}" href="{$U_FEED}">
{/html_head}
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div class="titrePage">
<ul class="categoryActions">
<li><a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
</a></li>
</ul>
<ul class="categoryActions"></ul>
<h2>{'Notification'|@translate}</h2>
</div>

View file

@ -1,11 +1,8 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div class="titrePage">
<ul class="categoryActions">
<li><a href="{$U_HOME}" title="{'Go through the gallery as a visitor'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
</a></li>
</ul>
<ul class="categoryActions"></ul>
<h2>{'Password forgotten'|@translate}</h2>
</div>

View file

@ -2,6 +2,11 @@
{include file='include/autosize.inc.tpl'}
*}
{if isset($MENUBAR)}
{$MENUBAR}
<div id="content" class="pictureContent">
{/if}
{if isset($errors)}
<div class="errors">
<ul>
@ -310,3 +315,7 @@ y.callService(
{/if}{*comments*}
{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
{if isset($MENUBAR)}
</div>
{/if}

View file

@ -1,3 +1,4 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
{if isset($errors)}
@ -11,11 +12,7 @@
{/if}
<div class="titrePage">
<ul class="categoryActions">
<li><a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
</a></li>
</ul>
<ul class="categoryActions"></ul>
<h2>{'Profile'|@translate}</h2>
</div>

View file

@ -1,13 +1,10 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="registerPage">
<div id="content" class="content">
<div class="titrePage">
<ul class="categoryActions">
<li><a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
</a></li>
</ul>
<ul class="categoryActions"></ul>
<h2>{'Registration'|@translate}</h2>
</div>

View file

@ -14,6 +14,7 @@
{/literal}{/footer_script}
*}
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div class="titrePage">
@ -22,9 +23,6 @@
<li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-help">&nbsp;</span><span class="pwg-button-text">{'Help'|@translate}</span>
</a></li>
<li><a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
</a></li>
</ul>
<h2>{'Search'|@translate}</h2>
</div>

View file

@ -1,3 +1,4 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div class="titrePage">
@ -12,9 +13,6 @@
<span class="pwg-icon pwg-icon-letters">&nbsp;</span><span class="pwg-button-text">{'letters'|@translate}</span>
</a></li>
{/if}
<li><a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
</a></li>
</ul>
<h2>{'Tags'|@translate}</h2>
</div>

View file

@ -89,11 +89,6 @@
* Content
*/
.content {
margin: 1em;
}
#theCategoryPage .content
{
margin-left: 20em; /* = #menubar width + 2em */
}
@ -411,6 +406,16 @@ TD.calDayHead {
background: url('icon/rating-stars.gif') no-repeat 0 center; width:16px;
}
/* only if menubar is shown */
.pictureContent {
margin-left:20em;
}
.pictureContent #imageToolBar,
.pictureContent #theImage,
.pictureContent hr.separation {
clear:none;
}
/**
* Default Layout