diff options
author | patdenice <patdenice@piwigo.org> | 2010-03-23 21:19:55 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2010-03-23 21:19:55 +0000 |
commit | c4fd9f91412e5be9d9c426d18ea260ae970e96d4 (patch) | |
tree | 16286aff56868844a8088346fcd2a9ca3c5923bc /index.php | |
parent | 8b816a18f45bb698c5a84eaca50f4de1dcb903c1 (diff) |
Feature 1533: Change "General" by "Options" in Configuration menu.
Change "Default Display" tab by "Guest Settings" tab.
Add display tab in Configuration/Option menu.
Allow to activate/deactivate a lot of display features:
On main page:
# Display only recently posted images
# Sort order
# Display all elements in all sub-categories
# Display a calendar by posted date
# Display a calendar by creation date
# Slideshow
On photo page:
# Show file metadata
# slideshow
# Add this image to your favorites
# Navigation Bar
# Navigation Thumbnails
git-svn-id: http://piwigo.org/svn/trunk@5293 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 51 |
1 files changed, 30 insertions, 21 deletions
@@ -107,7 +107,7 @@ if (isset($page['flat']) or isset($page['chronology_field'])) ); } -if (!isset($page['flat']) and 'categories' == $page['section']) +if ($conf['index_flat_icon'] and !isset($page['flat']) and 'categories' == $page['section']) { $template->assign( 'U_MODE_FLAT', @@ -123,16 +123,21 @@ if (!isset($page['chronology_field'])) 'chronology_style' => 'monthly', 'chronology_view' => 'list', ); - $template->assign( - 'U_MODE_CREATED', - duplicate_index_url( $chronology_params, array('start', 'flat') ) - ); - - $chronology_params['chronology_field'] = 'posted'; - $template->assign( - 'U_MODE_POSTED', - duplicate_index_url( $chronology_params, array('start', 'flat') ) - ); + if ($conf['index_created_date_icon']) + { + $template->assign( + 'U_MODE_CREATED', + duplicate_index_url( $chronology_params, array('start', 'flat') ) + ); + } + if ($conf['index_posted_date_icon']) + { + $chronology_params['chronology_field'] = 'posted'; + $template->assign( + 'U_MODE_POSTED', + duplicate_index_url( $chronology_params, array('start', 'flat') ) + ); + } } else { @@ -144,14 +149,17 @@ else { $chronology_field = 'created'; } - $url = duplicate_index_url( - array('chronology_field'=>$chronology_field ), - array('chronology_date', 'start', 'flat') - ); - $template->assign( - 'U_MODE_'.strtoupper($chronology_field), - $url - ); + if ($conf['index_'.$chronology_field.'_date_icon']) + { + $url = duplicate_index_url( + array('chronology_field'=>$chronology_field ), + array('chronology_date', 'start', 'flat') + ); + $template->assign( + 'U_MODE_'.strtoupper($chronology_field), + $url + ); + } } if ('search' == $page['section']) @@ -218,7 +226,8 @@ if ( $page['section']=='search' and $page['start']==0 and // navigation bar $template->assign( 'navbar', $page['navigation_bar'] ); -if ( count($page['items']) > 0 +if ( $conf['index_sort_order_input'] + and count($page['items']) > 0 and $page['section'] != 'most_visited' and $page['section'] != 'best_rated') { @@ -278,7 +287,7 @@ if (!empty($page['cat_slideshow_url'])) { redirect($page['cat_slideshow_url']); } - else + elseif ($conf['index_slideshow_icon']) { $template->assign('U_SLIDESHOW', $page['cat_slideshow_url']); } |