feature:2330 ability to hide the "new" icon for recent photos
git-svn-id: http://piwigo.org/svn/trunk@11285 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
87e8bd9788
commit
7532e1a802
9 changed files with 70 additions and 8 deletions
|
@ -78,6 +78,7 @@ $display_checkboxes = array(
|
|||
'index_posted_date_icon',
|
||||
'index_created_date_icon',
|
||||
'index_slideshow_icon',
|
||||
'index_new_icon',
|
||||
'picture_metadata_icon',
|
||||
'picture_slideshow_icon',
|
||||
'picture_favorite_icon',
|
||||
|
|
|
@ -239,6 +239,13 @@ jQuery(document).ready(function () {
|
|||
<span class="property">{'display only recently posted photos'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}</span>
|
||||
<input type="checkbox" name="menubar_filter_icon" {if ($display.menubar_filter_icon)}checked="checked"{/if}>
|
||||
</label>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>
|
||||
<span class="property">{'Activate icon "new" next to albums and pictures'|@translate}</span>
|
||||
<input type="checkbox" name="index_new_icon" {if ($display.index_new_icon)}checked="checked"{/if}>
|
||||
</label>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
|
|
@ -306,7 +306,6 @@ if (count($categories) > 0)
|
|||
'ID' => $category['id'],
|
||||
'TN_SRC' => $thumbnail_src_of[$category['representative_picture_id']],
|
||||
'TN_ALT' => strip_tags($category['name']),
|
||||
'icon_ts' => get_icon($category['max_date_last'], $category['is_child_date_last']),
|
||||
|
||||
'URL' => make_index_url(
|
||||
array(
|
||||
|
@ -328,6 +327,10 @@ if (count($categories) > 0)
|
|||
'subcatify_category_description')),
|
||||
'NAME' => $name,
|
||||
);
|
||||
if ($conf['index_new_icon'])
|
||||
{
|
||||
$row['icon_ts'] = get_icon($category['max_date_last'], $category['is_child_date_last']);
|
||||
}
|
||||
|
||||
if ($conf['display_fromto'])
|
||||
{
|
||||
|
|
|
@ -110,7 +110,6 @@ foreach ($pictures as $row)
|
|||
'TN_SRC' => get_thumbnail_url($row),
|
||||
'TN_ALT' => $row['file'],
|
||||
'TN_TITLE' => get_thumbnail_title($row),
|
||||
'icon_ts' => get_icon($row['date_available']),
|
||||
'URL' => $url,
|
||||
|
||||
/* Fields for template-extension usage */
|
||||
|
@ -127,6 +126,10 @@ foreach ($pictures as $row)
|
|||
'FILE_HAS_HD' => ($row['has_high'] and $user['enabled_high']=='true') ?
|
||||
true:false, /* lack of include/functions_picture.inc.php */
|
||||
);
|
||||
if ($conf['index_new_icon'])
|
||||
{
|
||||
$row['icon_ts'] = get_icon($row['date_available']);
|
||||
}
|
||||
|
||||
if ($user['show_nb_hits'])
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@ function check_restrictions($category_id)
|
|||
|
||||
function get_categories_menu()
|
||||
{
|
||||
global $page, $user, $filter;
|
||||
global $page, $user, $filter, $conf;
|
||||
|
||||
$query = '
|
||||
SELECT ';
|
||||
|
@ -110,21 +110,24 @@ WHERE '.$where.'
|
|||
'render_category_name',
|
||||
$row['name'],
|
||||
'get_categories_menu'
|
||||
),
|
||||
),
|
||||
'TITLE' => get_display_images_count(
|
||||
$row['nb_images'],
|
||||
$row['count_images'],
|
||||
$row['count_categories'],
|
||||
false,
|
||||
' / '
|
||||
),
|
||||
),
|
||||
'URL' => make_index_url(array('category' => $row)),
|
||||
'LEVEL' => substr_count($row['global_rank'], '.') + 1,
|
||||
'icon_ts' => get_icon($row['max_date_last'], $child_date_last),
|
||||
'SELECTED' => $selected_category['id'] == $row['id'] ? true : false,
|
||||
'IS_UPPERCAT' => $selected_category['id_uppercat'] == $row['id'] ? true : false,
|
||||
)
|
||||
);
|
||||
)
|
||||
);
|
||||
if ($conf['index_new_icon'])
|
||||
{
|
||||
$row['icon_ts'] = get_icon($row['max_date_last'], $child_date_last);
|
||||
}
|
||||
array_push($cats, $row);
|
||||
if ($row['id']==@$page['category']['id']) //save the number of subcats for later optim
|
||||
$page['category']['count_categories'] = $row['count_categories'];
|
||||
|
|
|
@ -36,6 +36,7 @@ INSERT INTO piwigo_config (param,value,comment) VALUES ('index_flat_icon','true'
|
|||
INSERT INTO piwigo_config (param,value,comment) VALUES ('index_posted_date_icon','true','Display calendar by posted date');
|
||||
INSERT INTO piwigo_config (param,value,comment) VALUES ('index_created_date_icon','true','Display calendar by creation date icon');
|
||||
INSERT INTO piwigo_config (param,value,comment) VALUES ('index_slideshow_icon','true','Display slideshow icon');
|
||||
INSERT INTO piwigo_config (param,value,comment) VALUES ('index_new_icon','true','Display new icons next albums and pictures');
|
||||
INSERT INTO piwigo_config (param,value,comment) VALUES ('picture_metadata_icon','true','Display metadata icon on picture page');
|
||||
INSERT INTO piwigo_config (param,value,comment) VALUES ('picture_slideshow_icon','true','Display slideshow icon on picture page');
|
||||
INSERT INTO piwigo_config (param,value,comment) VALUES ('picture_favorite_icon','true','Display favorite icon on picture page');
|
||||
|
|
42
install/db/107-database.php
Normal file
42
install/db/107-database.php
Normal 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 = 'Display new icons next albums and pictures';
|
||||
|
||||
$query = '
|
||||
INSERT INTO piwigo_config (param,value,comment)
|
||||
VALUES (\'index_new_icon\',\'true\',\'Display new icons next albums and pictures\')
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
echo
|
||||
"\n"
|
||||
. $upgrade_description
|
||||
."\n"
|
||||
;
|
||||
?>
|
|
@ -98,6 +98,7 @@ $lang['Activate icon "%s"'] = 'Activate icon "%s"';
|
|||
$lang['Activate Navigation Bar'] = 'Activate navigation bar';
|
||||
$lang['Activate Navigation Thumbnails'] = 'Activate navigation thumbnails';
|
||||
$lang['Activate'] = "Activate";
|
||||
$lang['Activate icon "new" next to albums and pictures'] = 'Activate icon "new" next to albums and pictures';
|
||||
$lang['Active Languages'] = 'Active Languages';
|
||||
$lang['Active Plugins'] = 'Active Plugins';
|
||||
$lang['Active Themes'] = 'Active Themes';
|
||||
|
|
|
@ -852,4 +852,5 @@ $lang['Default photos order inside album'] = "Ordre par défaut des photos dans
|
|||
$lang['Invalid order string'] = 'Chaîne SQL incorrecte';
|
||||
$lang['As default order'] = "Comme l'ordre par défaut";
|
||||
$lang['Custom'] = "Personnalisé";
|
||||
$lang['Activate icon "new" next to albums and pictures'] = 'Afficher l\'icône "nouveau" à côté des albums et des photos';
|
||||
?>
|
Loading…
Add table
Reference in a new issue