bug 2553 hide menubar/register on indentification page if gallery is locked or guest_access is false

git-svn-id: http://piwigo.org/svn/trunk@12878 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2012-01-12 20:50:46 +00:00
parent 65590487d4
commit 6a115001ba
14 changed files with 35 additions and 31 deletions

View File

@@ -271,7 +271,7 @@ jQuery(document).ready(function () {
<li>
<label>
<span class="property">{'Sort order'|@translate|@string_format:$pwg->l10n('Activate field "%s"')}</span>
<span class="property">{'Sort order'|@translate|@string_format:$pwg->l10n('Activate icon "%s"')}</span>
<input type="checkbox" name="index_sort_order_input" {if ($display.index_sort_order_input)}checked="checked"{/if}>
</label>
</li>

View File

@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
// | Copyright(C) 2008-2011 Piwigo Team http://piwigo.org |
// | Copyright(C) 2008-2012 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 |
// +-----------------------------------------------------------------------+
@@ -82,21 +82,25 @@ $template->set_filenames( array('identification'=>'identification.tpl') );
$template->assign(
array(
'U_LOST_PASSWORD' => get_root_url().'password.php',
'U_REDIRECT' => $redirect_to,
'F_LOGIN_ACTION' => get_root_url().'identification.php',
'authorize_remembering' => $conf['authorize_remembering'],
));
if ($conf['allow_user_registration'])
if (!$conf['gallery_locked'] && $conf['allow_user_registration'])
{
$template->assign('U_REGISTER', get_root_url().'register.php' );
}
if (!$conf['gallery_locked'])
{
$template->assign('U_LOST_PASSWORD', get_root_url().'password.php' );
}
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['hide_menu_on']) OR !in_array('theIdentificationPage', $themeconf['hide_menu_on']))
if (!$conf['gallery_locked'] && (!isset($themeconf['hide_menu_on']) OR !in_array('theIdentificationPage', $themeconf['hide_menu_on'])))
{
include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
}

View File

@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
// | Copyright(C) 2008-2011 Piwigo Team http://piwigo.org |
// | Copyright(C) 2008-2012 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 |
// +-----------------------------------------------------------------------+
@@ -1076,14 +1076,17 @@ SELECT param, value
while ($row = pwg_db_fetch_assoc($result))
{
$conf[ $row['param'] ] = isset($row['value']) ? $row['value'] : '';
// If the field is true or false, the variable is transformed into a
// boolean value.
if ($conf[$row['param']] == 'true' or $conf[$row['param']] == 'false')
$val = isset($row['value']) ? $row['value'] : '';
// If the field is true or false, the variable is transformed into a boolean value.
if ($val == 'true')
{
$conf[ $row['param'] ] = get_boolean($conf[ $row['param'] ]);
$val = true;
}
elseif ($val == 'false')
{
$val = false;
}
$conf[ $row['param'] ] = $val;
}
}

View File

@@ -97,7 +97,6 @@ $lang['ACCESS_4'] = "Access to webmasters";
$lang['ACCESS_5'] = "No access";
$lang['Action'] = 'Action';
$lang['Actions'] = "Actions";
$lang['Activate field "%s"'] = 'Activate field "%s"';
$lang['Activate icon "%s"'] = 'Activate icon "%s"';
$lang['Activate icon "new" next to albums and pictures'] = 'Activate icon "new" next to albums and pictures';
$lang['Activate Navigation Bar'] = 'Activate navigation bar';

View File

@@ -1,5 +1,5 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
<div class="titrePage">
<ul class="categoryActions">
<li><a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">

View File

@@ -1,5 +1,5 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
<div class="titrePage">
<ul class="categoryActions">

View File

@@ -1,5 +1,5 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
<div class="titrePage">
<ul class="categoryActions">
@@ -47,16 +47,18 @@
<input tabindex="4" type="submit" name="login" value="{'Submit'|@translate}">
</p>
<p>
<p>
{if isset($U_REGISTER)}
<a href="{$U_REGISTER}" title="{'Register'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-register">&nbsp;</span><span>{'Register'|@translate}</span>
</a>
{/if}
{if isset($U_LOST_PASSWORD)}
<a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-lost-password">&nbsp;</span><span>{'Forgot your password?'|@translate}</span>
</a>
</p>
{/if}
</p>
</form>

View File

@@ -1,6 +1,6 @@
{$MENUBAR}
{if !empty($PLUGIN_INDEX_CONTENT_BEFORE)}{$PLUGIN_INDEX_CONTENT_BEFORE}{/if}
<div id="content" class="content">
<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
<div class="titrePage">
<ul class="categoryActions">
{if !empty($image_orders)}

View File

@@ -4,7 +4,7 @@
{/html_head}
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
<div class="titrePage">
<ul class="categoryActions">

View File

@@ -4,7 +4,7 @@
{if isset($MENUBAR)}
{$MENUBAR}
<div id="content" class="pictureContent">
<div id="content" class="contentWithMenu">
{/if}
{include file='infos_errors.tpl'}

View File

@@ -1,5 +1,5 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
<div class="titrePage">
<ul class="categoryActions">

View File

@@ -15,7 +15,7 @@
*}
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
<div class="titrePage">
<ul class="categoryActions">

View File

@@ -1,5 +1,5 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
<div class="titrePage">
<ul class="categoryActions">

View File

@@ -83,7 +83,7 @@
/**
* Content
*/
.content {
.contentWithMenu {
margin-left: 20em; /* = #menubar width + 2em */
}
@@ -417,12 +417,8 @@ 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 {
.contentWithMenu #imageToolBar,
.contentWithMenu #theImage {
clear: none;
}