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 diff --git a/admin/themes/default/default-layout.css b/admin/themes/default/default-layout.css index 499e11e20..aa9f4fae1 100644 --- a/admin/themes/default/default-layout.css +++ b/admin/themes/default/default-layout.css @@ -126,14 +126,18 @@ FORM#categoryPermissions LI { FIELDSET#mainConfCheck SPAN.property, FIELDSET#historyConf SPAN.property, FIELDSET#commentsConf SPAN.property, -FIELDSET#uploadConf SPAN.property { +FIELDSET#uploadConf SPAN.property, +FIELDSET#indexDisplayConf SPAN.property, +FIELDSET#pictureDisplayConf SPAN.property { float: right; text-align: left; } FIELDSET#mainConfCheck INPUT, FIELDSET#historyConf INPUT, FIELDSET#commentsConf INPUT, -FIELDSET#uploadConf INPUT { +FIELDSET#uploadConf INPUT, +FIELDSET#indexDisplayConf INPUT, +FIELDSET#pictureDisplayConf INPUT { float: none; } @@ -145,12 +149,16 @@ FIELDSET#mainConf TEXTAREA.description { } FIELDSET#mainConfCheck SPAN.property, -FIELDSET#historyConf SPAN.property { +FIELDSET#historyConf SPAN.property, +FIELDSET#indexDisplayConf SPAN.property, +FIELDSET#pictureDisplayConf SPAN.property { width: 90%; } FIELDSET#mainConfCheck INPUT, FIELDSET#historyConf INPUT, -FIELDSET#commentsConf INPUT { +FIELDSET#commentsConf INPUT, +FIELDSET#indexDisplayConf INPUT, +FIELDSET#pictureDisplayConf INPUT { margin-left: 5%; } FIELDSET#uploadConf SELECT { diff --git a/admin/themes/default/template/admin.tpl b/admin/themes/default/template/admin.tpl index dca3cda6c..23da23182 100644 --- a/admin/themes/default/template/admin.tpl +++ b/admin/themes/default/template/admin.tpl @@ -81,8 +81,7 @@ jQuery().ready(function(){ldelim}
diff --git a/include/menubar.inc.php b/include/menubar.inc.php
index 39da47ada..27de0d5ef 100644
--- a/include/menubar.inc.php
+++ b/include/menubar.inc.php
@@ -79,7 +79,7 @@ function initialize_menu()
//-------------------------------------------------------------- categories
$block = $menu->get_block('mbCategories');
//------------------------------------------------------------------------ filter
- if (!empty($conf['filter_pages']) and get_filter_page_value('used'))
+ if ($conf['menubar_filter_icon'] and !empty($conf['filter_pages']) and get_filter_page_value('used'))
{
if ($filter['enabled'])
{
diff --git a/index.php b/index.php
index 962345023..f31abe978 100644
--- a/index.php
+++ b/index.php
@@ -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']);
}
diff --git a/install/config.sql b/install/config.sql
index 3f807a6bb..ad638325b 100644
--- a/install/config.sql
+++ b/install/config.sql
@@ -32,6 +32,17 @@ INSERT INTO piwigo_config (param,value,comment) VALUES ('upload_link_everytime',
INSERT INTO piwigo_config (param,value,comment) VALUES ('upload_user_access',2 /*ACCESS_CLASSIC*/,'User access level to upload');
INSERT INTO piwigo_config (param,value,comment) VALUES ('extents_for_templates','a:0:{}','Actived template-extension(s)');
INSERT INTO piwigo_config (param,value,comment) VALUES ('blk_menubar','','Menubar options');
+INSERT INTO piwigo_config (param,value,comment) VALUES ('menubar_filter_icon','true','Display filter icon');
+INSERT INTO piwigo_config (param,value,comment) VALUES ('index_sort_order_input','true','Display image order selection list');
+INSERT INTO piwigo_config (param,value,comment) VALUES ('index_flat_icon','true','Display flat icon');
+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 ('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');
+INSERT INTO piwigo_config (param,value,comment) VALUES ('picture_navigation_icons','true','Display navigation icons on picture page');
+INSERT INTO piwigo_config (param,value,comment) VALUES ('picture_navigation_thumb','true','Display navigation thumbnails on picture page');
INSERT INTO piwigo_themes (id, name) VALUES ('Sylvia', 'Sylvia');
INSERT INTO piwigo_themes (id, name) VALUES ('clear', 'clear');
diff --git a/install/db/87-database.php b/install/db/87-database.php
new file mode 100644
index 000000000..d5d188eb2
--- /dev/null
+++ b/install/db/87-database.php
@@ -0,0 +1,54 @@
+
\ No newline at end of file
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index 65fa2023f..973793ec7 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -679,4 +679,10 @@ $lang['Add New Theme'] = "Add New Theme";
$lang['Forbid this theme to users'] = "Forbid this theme to users";
$lang['Set as default theme for unregistered and new users'] = "Set as default theme for unregistered and new users";
$lang['unknown'] = 'unknown';
+
+$lang['Guest Settings'] = 'Guest Settings';
+$lang['Main Page'] = 'Main Page';
+$lang['Photo Page'] = 'Photo Page';
+$lang['Navigation Bar'] = 'Navigation Bar';
+$lang['Navigation Thumbnails'] = 'Navigation Thumbnails';
?>
\ No newline at end of file
diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php
index c3a9727d3..132bfd2ff 100644
--- a/language/fr_FR/admin.lang.php
+++ b/language/fr_FR/admin.lang.php
@@ -678,4 +678,10 @@ $lang['Add New Theme'] = "Ajouter un thème";
$lang['Forbid this theme to users'] = "Interdire ce thème aux utilisateurs";
$lang['Set as default theme for unregistered and new users'] = "Thème par défaut pour les invités et les nouveaux utilisateurs";
$lang['unknown'] = 'inconnu';
+
+$lang['Guest Settings'] = 'Paramètres invité';
+$lang['Main Page'] = 'Page Principale';
+$lang['Photo Page'] = 'Page de la Photo';
+$lang['Navigation Bar'] = 'Barre de navigation';
+$lang['Navigation Thumbnails'] = 'Miniatures de navigation';
?>
\ No newline at end of file
diff --git a/picture.php b/picture.php
index 6edbb6ca0..289839e7a 100644
--- a/picture.php
+++ b/picture.php
@@ -716,7 +716,7 @@ if ($page['slideshow'])
}
$template->assign('slideshow', $tpl_slideshow );
}
-else
+elseif ($conf['picture_slideshow_icon'])
{
$template->assign(
array(
@@ -739,10 +739,16 @@ $template->assign(
'U_HOME' => make_index_url(),
'U_UP' => $url_up,
- 'U_METADATA' => $url_metadata,
+ 'DISPLAY_NAV_BUTTONS' => $conf['picture_navigation_icons'],
+ 'DISPLAY_NAV_THUMB' => $conf['picture_navigation_thumb']
)
);
+if ($conf['picture_metadata_icon'])
+{
+ $template->assign('U_METADATA', $url_metadata);
+}
+
//------------------------------------------------------- upper menu management
diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl
index e5dd470e9..84dd8e43f 100644
--- a/themes/default/template/picture.tpl
+++ b/themes/default/template/picture.tpl
@@ -46,7 +46,9 @@
{if isset($U_SLIDESHOW_STOP) }
{/if}
+ {if isset($U_METADATA) }
+ {/if}
{if isset($current.U_DOWNLOAD) }
{/if}
@@ -98,6 +100,7 @@ y.callService(
+{if $DISPLAY_NAV_THUMB}
{if isset($previous) }
@@ -108,6 +111,7 @@ y.callService(
{/if}
+{/if}