Changeset 12878


Ignore:
Timestamp:
Jan 12, 2012, 9:50:46 PM (12 years ago)
Author:
rvelices
Message:

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

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/configuration.tpl

    r12872 r12878  
    272272    <li>
    273273      <label>
    274         <span class="property">{'Sort order'|@translate|@string_format:$pwg->l10n('Activate field "%s"')}</span>
     274        <span class="property">{'Sort order'|@translate|@string_format:$pwg->l10n('Activate icon "%s"')}</span>
    275275        <input type="checkbox" name="index_sort_order_input" {if ($display.index_sort_order_input)}checked="checked"{/if}>
    276276      </label>
  • trunk/identification.php

    r12764 r12878  
    33// | Piwigo - a PHP based photo gallery                                    |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
     5// | Copyright(C) 2008-2012 Piwigo Team                  http://piwigo.org |
    66// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
    77// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     
    8383$template->assign(
    8484  array(
    85     'U_LOST_PASSWORD' => get_root_url().'password.php',
    8685    'U_REDIRECT' => $redirect_to,
    8786
     
    9089    ));
    9190
    92 if ($conf['allow_user_registration'])
     91if (!$conf['gallery_locked'] && $conf['allow_user_registration'])
    9392{
    9493  $template->assign('U_REGISTER', get_root_url().'register.php' );
    9594}
    9695
     96if (!$conf['gallery_locked'])
     97{
     98  $template->assign('U_LOST_PASSWORD', get_root_url().'password.php' );
     99}
     100
    97101// include menubar
    98102$themeconf = $template->get_template_vars('themeconf');
    99 if (!isset($themeconf['hide_menu_on']) OR !in_array('theIdentificationPage', $themeconf['hide_menu_on']))
     103if (!$conf['gallery_locked'] && (!isset($themeconf['hide_menu_on']) OR !in_array('theIdentificationPage', $themeconf['hide_menu_on'])))
    100104{
    101105  include( PHPWG_ROOT_PATH.'include/menubar.inc.php');
  • trunk/include/functions.inc.php

    r12870 r12878  
    33// | Piwigo - a PHP based photo gallery                                    |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
     5// | Copyright(C) 2008-2012 Piwigo Team                  http://piwigo.org |
    66// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
    77// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     
    10771077  while ($row = pwg_db_fetch_assoc($result))
    10781078  {
    1079     $conf[ $row['param'] ] = isset($row['value']) ? $row['value'] : '';
    1080 
    1081     // If the field is true or false, the variable is transformed into a
    1082     // boolean value.
    1083     if ($conf[$row['param']] == 'true' or $conf[$row['param']] == 'false')
    1084     {
    1085       $conf[ $row['param'] ] = get_boolean($conf[ $row['param'] ]);
    1086     }
     1079    $val = isset($row['value']) ? $row['value'] : '';
     1080    // If the field is true or false, the variable is transformed into a boolean value.
     1081    if ($val == 'true')
     1082    {
     1083      $val = true;
     1084    }
     1085    elseif ($val == 'false')
     1086    {
     1087      $val = false;
     1088    }
     1089    $conf[ $row['param'] ] = $val;
    10871090  }
    10881091}
  • trunk/language/en_UK/admin.lang.php

    r12782 r12878  
    9898$lang['Action'] = 'Action';
    9999$lang['Actions'] = "Actions";
    100 $lang['Activate field "%s"'] = 'Activate field "%s"';
    101100$lang['Activate icon "%s"'] = 'Activate icon "%s"';
    102101$lang['Activate icon "new" next to albums and pictures'] = 'Activate icon "new" next to albums and pictures';
  • trunk/themes/default/template/about.tpl

    r12764 r12878  
    11{if isset($MENUBAR)}{$MENUBAR}{/if}
    2 <div id="content" class="content">
     2<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
    33  <div class="titrePage">
    44    <ul class="categoryActions">
  • trunk/themes/default/template/comments.tpl

    r12764 r12878  
    11{if isset($MENUBAR)}{$MENUBAR}{/if}
    2 <div id="content" class="content">
     2<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
    33
    44<div class="titrePage">
  • trunk/themes/default/template/identification.tpl

    r12764 r12878  
    11{if isset($MENUBAR)}{$MENUBAR}{/if}
    2 <div id="content" class="content">
     2<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
    33
    44<div class="titrePage">
     
    4848  </p>
    4949
    50   <p>
     50        <p>
    5151{if isset($U_REGISTER)}
    5252                <a href="{$U_REGISTER}" title="{'Register'|@translate}" class="pwg-state-default pwg-button">
     
    5454                </a>
    5555{/if}
     56{if isset($U_LOST_PASSWORD)}
    5657                <a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}" class="pwg-state-default pwg-button">
    5758                        <span class="pwg-icon pwg-icon-lost-password">&nbsp;</span><span>{'Forgot your password?'|@translate}</span>
    5859                </a>
    59   </p>
     60{/if}
     61        </p>
    6062
    6163</form>
  • trunk/themes/default/template/index.tpl

    r12873 r12878  
    11{$MENUBAR}
    22{if !empty($PLUGIN_INDEX_CONTENT_BEFORE)}{$PLUGIN_INDEX_CONTENT_BEFORE}{/if}
    3 <div id="content" class="content">
     3<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
    44<div class="titrePage">
    55        <ul class="categoryActions">
  • trunk/themes/default/template/notification.tpl

    r12764 r12878  
    55
    66{if isset($MENUBAR)}{$MENUBAR}{/if}
    7 <div id="content" class="content">
     7<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
    88
    99  <div class="titrePage">
  • trunk/themes/default/template/picture.tpl

    r12764 r12878  
    55{if isset($MENUBAR)}
    66{$MENUBAR}
    7 <div id="content" class="pictureContent">
     7<div id="content" class="contentWithMenu">
    88{/if}
    99
  • trunk/themes/default/template/profile.tpl

    r12764 r12878  
    11{if isset($MENUBAR)}{$MENUBAR}{/if}
    2 <div id="content" class="content">
     2<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
    33
    44<div class="titrePage">
  • trunk/themes/default/template/search.tpl

    r12764 r12878  
    1616
    1717{if isset($MENUBAR)}{$MENUBAR}{/if}
    18 <div id="content" class="content">
     18<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
    1919
    2020        <div class="titrePage">
  • trunk/themes/default/template/tags.tpl

    r12764 r12878  
    11{if isset($MENUBAR)}{$MENUBAR}{/if}
    2 <div id="content" class="content">
     2<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
    33
    44<div class="titrePage">
  • trunk/themes/default/theme.css

    r12873 r12878  
    8484 * Content
    8585 */
    86 .content {
     86.contentWithMenu {
    8787        margin-left: 20em;  /* = #menubar width + 2em */
    8888}
     
    418418}
    419419
    420 /* only if menubar is shown */
    421 .pictureContent {
    422         margin-left:20em;
    423 }
    424 .pictureContent #imageToolBar,
    425 .pictureContent #theImage {
     420.contentWithMenu #imageToolBar,
     421.contentWithMenu #theImage {
    426422        clear: none;
    427423}
Note: See TracChangeset for help on using the changeset viewer.