aboutsummaryrefslogtreecommitdiffstats
path: root/admin/configuration.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2010-03-23 21:19:55 +0000
committerpatdenice <patdenice@piwigo.org>2010-03-23 21:19:55 +0000
commitc4fd9f91412e5be9d9c426d18ea260ae970e96d4 (patch)
tree16286aff56868844a8088346fcd2a9ca3c5923bc /admin/configuration.php
parent8b816a18f45bb698c5a84eaca50f4de1dcb903c1 (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 '')
-rw-r--r--admin/configuration.php39
1 files changed, 38 insertions, 1 deletions
diff --git a/admin/configuration.php b/admin/configuration.php
index 433397554..b8dc57433 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -75,6 +75,20 @@ $comments_checkboxes = array(
'email_admin_on_comment_deletion'
);
+$display_checkboxes = array(
+ 'menubar_filter_icon',
+ 'index_sort_order_input',
+ 'index_flat_icon',
+ 'index_posted_date_icon',
+ 'index_created_date_icon',
+ 'index_slideshow_icon',
+ 'picture_metadata_icon',
+ 'picture_slideshow_icon',
+ 'picture_favorite_icon',
+ 'picture_navigation_icons',
+ 'picture_navigation_thumb',
+ );
+
//------------------------------ verification and registration of modifications
if (isset($_POST['submit']) and !is_adviser())
{
@@ -131,6 +145,14 @@ if (isset($_POST['submit']) and !is_adviser())
// Never go here
break;
}
+ case 'display' :
+ {
+ foreach( $display_checkboxes as $checkbox)
+ {
+ $_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
+ }
+ break;
+ }
}
// updating configuration if no error found
@@ -174,10 +196,11 @@ $template->set_filename('config', 'configuration.tpl');
$tabsheet = new tabsheet();
// TabSheet initialization
$tabsheet->add('main', l10n('Main'), $conf_link.'main');
+$tabsheet->add('display', l10n('Display'), $conf_link.'display');
$tabsheet->add('history', l10n('History'), $conf_link.'history');
$tabsheet->add('comments', l10n('Comments'), $conf_link.'comments');
$tabsheet->add('upload', l10n('Upload'), $conf_link.'upload');
-$tabsheet->add('default', l10n('Default display'), $conf_link.'default');
+$tabsheet->add('default', l10n('Guest Settings'), $conf_link.'default');
// TabSheet selection
$tabsheet->select($page['section']);
// Assign tabsheet to template
@@ -298,6 +321,20 @@ switch ($page['section'])
$template->assign('default', array());
break;
}
+ case 'display' :
+ {
+ foreach ($display_checkboxes as $checkbox)
+ {
+ $template->append(
+ 'display',
+ array(
+ $checkbox => $conf[$checkbox]
+ ),
+ true
+ );
+ }
+ break;
+ }
}
//----------------------------------------------------------- sending html code