From fdfe41e3433d420bbfe643ada3e98e1d081fd78d Mon Sep 17 00:00:00 2001 From: mistic100 Date: Sat, 7 May 2011 15:55:10 +0000 Subject: merge spread_menus to the core git-svn-id: http://piwigo.org/svn/trunk@10812 68402e56-0260-453c-a942-63ccdbb3a9ee --- about.php | 9 +++++- admin/configuration.php | 1 + admin/themes/default/template/configuration.tpl | 7 +++++ comments.php | 8 +++++ identification.php | 9 +++++- install/config.sql | 1 + install/db/105-database.php | 42 +++++++++++++++++++++++++ language/en_UK/admin.lang.php | 1 + language/fr_CA/admin.lang.php | 1 + language/fr_FR/admin.lang.php | 1 + nbm.php | 9 +++++- notification.php | 7 +++++ password.php | 7 +++++ picture.php | 8 +++++ profile.php | 12 +++++-- register.php | 9 +++++- search.php | 10 +++++- tags.php | 7 +++++ themes/Sylvia/theme.css | 15 ++++----- themes/default/local_head.tpl | 4 ++- themes/default/template/about.tpl | 7 ++--- themes/default/template/comments.tpl | 7 ++--- themes/default/template/identification.tpl | 7 ++--- themes/default/template/nbm.tpl | 8 ++--- themes/default/template/notification.tpl | 8 ++--- themes/default/template/password.tpl | 7 ++--- themes/default/template/picture.tpl | 9 ++++++ themes/default/template/profile.tpl | 7 ++--- themes/default/template/register.tpl | 7 ++--- themes/default/template/search.tpl | 4 +-- themes/default/template/tags.tpl | 4 +-- themes/default/theme.css | 15 ++++++--- 32 files changed, 191 insertions(+), 67 deletions(-) create mode 100644 install/db/105-database.php diff --git a/about.php b/about.php index 32861b4ae..ec524938a 100644 --- a/about.php +++ b/about.php @@ -36,7 +36,6 @@ check_status(ACCESS_GUEST); // $title= l10n('About Piwigo'); $page['body_id'] = 'theAboutPage'; -include(PHPWG_ROOT_PATH.'include/page_header.php'); trigger_action('loc_begin_about'); @@ -50,6 +49,14 @@ if ( $theme_about !== false ) $template->assign('THEME_ABOUT', $theme_about); } +// include menubar +$themeconf = $template->get_template_vars('themeconf'); +if (!isset($themeconf['Exclude']) OR !in_array('theAboutPage', $themeconf['Exclude'])) +{ + include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); +} + +include(PHPWG_ROOT_PATH.'include/page_header.php'); $template->pparse('about'); include(PHPWG_ROOT_PATH.'include/page_tail.php'); ?> diff --git a/admin/configuration.php b/admin/configuration.php index c84962e42..ea8c6b773 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -84,6 +84,7 @@ $display_checkboxes = array( 'picture_download_icon', 'picture_navigation_icons', 'picture_navigation_thumb', + 'picture_menu', ); $display_info_checkboxes = array( diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl index e241f220f..aeeba5ab3 100644 --- a/admin/themes/default/template/configuration.tpl +++ b/admin/themes/default/template/configuration.tpl @@ -285,6 +285,13 @@ + +
  • + +
  • diff --git a/comments.php b/comments.php index 3fbeef8bb..40a3f7338 100644 --- a/comments.php +++ b/comments.php @@ -527,6 +527,14 @@ SELECT c.id, name, permalink, uppercats, com.id as comment_id $template->append('comments', $tpl_comment); } } + +// include menubar +$themeconf = $template->get_template_vars('themeconf'); +if (!isset($themeconf['Exclude']) OR !in_array('theCommentsPage', $themeconf['Exclude'])) +{ + include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); +} + // +-----------------------------------------------------------------------+ // | html code display | // +-----------------------------------------------------------------------+ diff --git a/identification.php b/identification.php index 6d345bf45..20be085b1 100644 --- a/identification.php +++ b/identification.php @@ -73,7 +73,6 @@ if (isset($_POST['login'])) // $title = l10n('Identification'); $page['body_id'] = 'theIdentificationPage'; -include(PHPWG_ROOT_PATH.'include/page_header.php'); $template->set_filenames( array('identification'=>'identification.tpl') ); @@ -97,7 +96,15 @@ if ( sizeof( $errors ) != 0 ) $template->assign('errors', $errors); } +// include menubar +$themeconf = $template->get_template_vars('themeconf'); +if (!isset($themeconf['Exclude']) OR !in_array('theIdentificationPage', $themeconf['Exclude'])) +{ + include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); +} + //----------------------------------------------------------- html code display +include(PHPWG_ROOT_PATH.'include/page_header.php'); $template->pparse('identification'); include(PHPWG_ROOT_PATH.'include/page_tail.php'); ?> diff --git a/install/config.sql b/install/config.sql index 8019367ee..d12f2626f 100644 --- a/install/config.sql +++ b/install/config.sql @@ -42,6 +42,7 @@ INSERT INTO piwigo_config (param,value,comment) VALUES ('picture_favorite_icon', INSERT INTO piwigo_config (param,value,comment) VALUES ('picture_download_icon','true','Display download 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_config (param,value,comment) VALUES ('picture_menu','false','Show menubar on picture page'); INSERT INTO piwigo_config (param,value,comment) VALUES ( 'picture_informations', diff --git a/install/db/105-database.php b/install/db/105-database.php new file mode 100644 index 000000000..e5ae9b795 --- /dev/null +++ b/install/db/105-database.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php index 9ec2872e3..b2e86013e 100644 --- a/language/en_UK/admin.lang.php +++ b/language/en_UK/admin.lang.php @@ -605,6 +605,7 @@ $lang['Set title'] = 'Set title'; $lang['set to'] = "set to"; $lang['Settings'] = 'Settings'; $lang['Show info'] = "Show info"; +$lang['Show menubar'] = "Show menubar"; $lang['Simulation'] = "Simulation"; $lang['singly represented'] = "fixed representative"; $lang['Site manager'] = "Site manager"; diff --git a/language/fr_CA/admin.lang.php b/language/fr_CA/admin.lang.php index 5d452bb06..202949268 100644 --- a/language/fr_CA/admin.lang.php +++ b/language/fr_CA/admin.lang.php @@ -799,4 +799,5 @@ $lang['Compact'] = "Compact"; $lang['Complete'] = "Complet"; $lang['Restore'] = "Restaurer"; $lang['Restore default configuration. You will lost your plugin settings!'] = "Restaurer la configuration par défaut? Vous perdrez vos réglages personnels !"; +$lang['Show menubar'] = "Afficher le menu"; ?> \ No newline at end of file diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php index 77544b1e6..66f3cd258 100644 --- a/language/fr_FR/admin.lang.php +++ b/language/fr_FR/admin.lang.php @@ -841,4 +841,5 @@ $lang['Height'] = 'Hauteur'; $lang['Follow Orientation'] = "Respecter l'orientation"; $lang['If you want to regenerate thumbnails, please go to the Batch Manager.'] = 'Si vous voulez régénérer des miniatures, merci de vous rendre dans la Gestion par lot.'; $lang['Graphics Library'] = 'Bibliothèque graphique'; +$lang['Show menubar'] = "Afficher le menu"; ?> \ No newline at end of file diff --git a/nbm.php b/nbm.php index 9bb40aee6..d98f8c1ac 100644 --- a/nbm.php +++ b/nbm.php @@ -65,7 +65,6 @@ else // +-----------------------------------------------------------------------+ $title = l10n('Notification'); $page['body_id'] = 'theNBMPage'; -include(PHPWG_ROOT_PATH.'include/page_header.php'); $template->set_filenames(array('nbm'=>'nbm.tpl')); @@ -78,10 +77,18 @@ $template->assign( 'infos' => $page['infos'], ) ); + +// include menubar +$themeconf = $template->get_template_vars('themeconf'); +if (!isset($themeconf['Exclude']) OR !in_array('theNBMPage', $themeconf['Exclude'])) +{ + include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); +} // +-----------------------------------------------------------------------+ // | html code display | // +-----------------------------------------------------------------------+ +include(PHPWG_ROOT_PATH.'include/page_header.php'); $template->parse('nbm'); include(PHPWG_ROOT_PATH.'include/page_tail.php'); ?> diff --git a/notification.php b/notification.php index ef0f1bba1..d89d00c29 100644 --- a/notification.php +++ b/notification.php @@ -77,6 +77,13 @@ $template->assign( 'U_FEED_IMAGE_ONLY' => $feed_image_only_url, ) ); + +// include menubar +$themeconf = $template->get_template_vars('themeconf'); +if (!isset($themeconf['Exclude']) OR !in_array('theNotificationPage', $themeconf['Exclude'])) +{ + include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); +} // +-----------------------------------------------------------------------+ // | html code display | diff --git a/password.php b/password.php index ffd50e8bb..d47d75c65 100644 --- a/password.php +++ b/password.php @@ -153,6 +153,13 @@ $template->assign( array( $template->assign('errors', $page['errors']); $template->assign('infos', $page['infos']); +// include menubar +$themeconf = $template->get_template_vars('themeconf'); +if (!isset($themeconf['Exclude']) OR !in_array('thePasswordPage', $themeconf['Exclude'])) +{ + include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); +} + // +-----------------------------------------------------------------------+ // | html code display | // +-----------------------------------------------------------------------+ diff --git a/picture.php b/picture.php index c0493d8b0..3464230f6 100644 --- a/picture.php +++ b/picture.php @@ -1040,6 +1040,14 @@ if ($metadata_showable and pwg_get_session_var('show_metadata') <> null ) include(PHPWG_ROOT_PATH.'include/picture_metadata.inc.php'); } +// include menubar +$themeconf = $template->get_template_vars('themeconf'); +if ($conf['picture_menu'] AND (!isset($themeconf['Exclude']) OR !in_array('theIdentificationPage', $themeconf['Exclude']))) +{ + include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); + $template->assign('U_ADMIN', $url_admin); // overwrited by the menu +} + include(PHPWG_ROOT_PATH.'include/page_header.php'); trigger_action('loc_end_picture'); if ($page['slideshow'] and $conf['light_slideshow']) diff --git a/profile.php b/profile.php index 498c5546e..ee17b26ed 100644 --- a/profile.php +++ b/profile.php @@ -68,7 +68,7 @@ SELECT '.implode(',', $fields).' $title= l10n('Your Gallery Customization'); $page['body_id'] = 'theProfilePage'; - include(PHPWG_ROOT_PATH.'include/page_header.php'); + $template->set_filename('profile', 'profile.tpl'); load_profile_in_template( get_root_url().'profile.php', // action @@ -82,7 +82,15 @@ SELECT '.implode(',', $fields).' { $template->assign('errors', $errors); } - $template->set_filename('profile', 'profile.tpl'); + + // include menubar + $themeconf = $template->get_template_vars('themeconf'); + if (!isset($themeconf['Exclude']) OR !in_array('theProfilePage', $themeconf['Exclude'])) + { + include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); + } + + include(PHPWG_ROOT_PATH.'include/page_header.php'); trigger_action('loc_end_profile'); $template->pparse('profile'); include(PHPWG_ROOT_PATH.'include/page_tail.php'); diff --git a/register.php b/register.php index 6a09879a8..af90bbfa4 100644 --- a/register.php +++ b/register.php @@ -80,7 +80,6 @@ $email = !empty($_POST['mail_address'])?htmlspecialchars(stripslashes($_POST['ma // $title= l10n('Registration'); $page['body_id'] = 'theRegisterPage'; -include(PHPWG_ROOT_PATH.'include/page_header.php'); $template->set_filenames( array('register'=>'register.tpl') ); $template->assign(array( @@ -97,6 +96,14 @@ if (count($errors) != 0) $template->assign('errors', $errors); } +// include menubar +$themeconf = $template->get_template_vars('themeconf'); +if (!isset($themeconf['Exclude']) OR !in_array('theRegisterPage', $themeconf['Exclude'])) +{ + include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); +} + +include(PHPWG_ROOT_PATH.'include/page_header.php'); $template->parse('register'); include(PHPWG_ROOT_PATH.'include/page_tail.php'); ?> diff --git a/search.php b/search.php index fecbf4552..7cfbab3ae 100644 --- a/search.php +++ b/search.php @@ -227,7 +227,15 @@ if (sizeof($errors) != 0) { $template->assign('errors', $errors); } -//------------------------------------------------------------ log informations + +// include menubar +$themeconf = $template->get_template_vars('themeconf'); +if (!isset($themeconf['Exclude']) OR !in_array('theSearchPage', $themeconf['Exclude'])) +{ + include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); +} + +//------------------------------------------------------------ html code display include(PHPWG_ROOT_PATH.'include/page_header.php'); $template->pparse('search'); include(PHPWG_ROOT_PATH.'include/page_tail.php'); diff --git a/tags.php b/tags.php index e44b0f505..2681e5363 100644 --- a/tags.php +++ b/tags.php @@ -191,6 +191,13 @@ foreach ($tags as $tag) ); } +// include menubar +$themeconf = $template->get_template_vars('themeconf'); +if (!isset($themeconf['Exclude']) OR !in_array('theTagsPage', $themeconf['Exclude'])) +{ + include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); +} + include(PHPWG_ROOT_PATH.'include/page_header.php'); $template->pparse('tags'); include(PHPWG_ROOT_PATH.'include/page_tail.php'); diff --git a/themes/Sylvia/theme.css b/themes/Sylvia/theme.css index 22f0ff13f..252ccf5c0 100644 --- a/themes/Sylvia/theme.css +++ b/themes/Sylvia/theme.css @@ -141,6 +141,10 @@ .content { background:#222 url(images/fillet.gif) repeat-x scroll left top; min-height:466px; + border: 1px solid #000; + border-top: 0; + margin:21px 7px 0 290px !important; + padding-top:7px; } #the_page { @@ -155,13 +159,6 @@ min-width: 100%; } -#theCategoryPage .content { - border: 1px solid #000; - border-top: 0; - margin:21px 7px 0 290px !important; - padding-top:7px; -} - .content h2 { margin:0; padding:0px 10px 15px 15px; @@ -362,6 +359,10 @@ border-top:0 !important; } +.pictureContent { + margin:0 7px 7px 290px; +} + #addComment fieldset { color: #f70; border-color: #f70; diff --git a/themes/default/local_head.tpl b/themes/default/local_head.tpl index d35ab8401..38bb4ec0e 100644 --- a/themes/default/local_head.tpl +++ b/themes/default/local_head.tpl @@ -6,4 +6,6 @@ {combine_css path="themes/default/print.css" order=-10} -{/if} \ No newline at end of file +{/if} + +{if !isset($MENUBAR)}{/if} \ No newline at end of file diff --git a/themes/default/template/about.tpl b/themes/default/template/about.tpl index 2ce658c44..f86d7bef3 100644 --- a/themes/default/template/about.tpl +++ b/themes/default/template/about.tpl @@ -1,10 +1,7 @@ +{if isset($MENUBAR)}{$MENUBAR}{/if}
    - +

      {'About'|@translate}

      diff --git a/themes/default/template/comments.tpl b/themes/default/template/comments.tpl index 56f3b8a86..543a15cb8 100644 --- a/themes/default/template/comments.tpl +++ b/themes/default/template/comments.tpl @@ -1,11 +1,8 @@ +{if isset($MENUBAR)}{$MENUBAR}{/if}
      - +

        {'User comments'|@translate}

        diff --git a/themes/default/template/identification.tpl b/themes/default/template/identification.tpl index 3fcc24b50..2741e685b 100644 --- a/themes/default/template/identification.tpl +++ b/themes/default/template/identification.tpl @@ -1,11 +1,8 @@ +{if isset($MENUBAR)}{$MENUBAR}{/if}
        - +

          {'Identification'|@translate}

          diff --git a/themes/default/template/nbm.tpl b/themes/default/template/nbm.tpl index 5c40d2938..2227e1453 100644 --- a/themes/default/template/nbm.tpl +++ b/themes/default/template/nbm.tpl @@ -1,11 +1,7 @@ - +{if isset($MENUBAR)}{$MENUBAR}{/if}
          - +

            {'Notification'|@translate}

            diff --git a/themes/default/template/notification.tpl b/themes/default/template/notification.tpl index 99317a872..62a6d47cd 100644 --- a/themes/default/template/notification.tpl +++ b/themes/default/template/notification.tpl @@ -2,14 +2,12 @@ {/html_head} + +{if isset($MENUBAR)}{$MENUBAR}{/if}
            - +

              {'Notification'|@translate}

              diff --git a/themes/default/template/password.tpl b/themes/default/template/password.tpl index def94dff8..8b7390e4b 100644 --- a/themes/default/template/password.tpl +++ b/themes/default/template/password.tpl @@ -1,11 +1,8 @@ +{if isset($MENUBAR)}{$MENUBAR}{/if}
              - +

                {'Password forgotten'|@translate}

                diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl index 12d020269..d029aa33d 100644 --- a/themes/default/template/picture.tpl +++ b/themes/default/template/picture.tpl @@ -2,6 +2,11 @@ {include file='include/autosize.inc.tpl'} *} +{if isset($MENUBAR)} +{$MENUBAR} +
                +{/if} + {if isset($errors)}
                  @@ -310,3 +315,7 @@ y.callService( {/if}{*comments*} {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if} + +{if isset($MENUBAR)} +
                +{/if} diff --git a/themes/default/template/profile.tpl b/themes/default/template/profile.tpl index 3a401c599..0c23b7ee1 100644 --- a/themes/default/template/profile.tpl +++ b/themes/default/template/profile.tpl @@ -1,3 +1,4 @@ +{if isset($MENUBAR)}{$MENUBAR}{/if}
                {if isset($errors)} @@ -11,11 +12,7 @@ {/if}
                - +

                  {'Profile'|@translate}

                  diff --git a/themes/default/template/register.tpl b/themes/default/template/register.tpl index b827c3aa0..a96200f8a 100644 --- a/themes/default/template/register.tpl +++ b/themes/default/template/register.tpl @@ -1,13 +1,10 @@ +{if isset($MENUBAR)}{$MENUBAR}{/if}
                  - +

                    {'Registration'|@translate}

                    diff --git a/themes/default/template/search.tpl b/themes/default/template/search.tpl index e16e5e897..1a9a685d7 100644 --- a/themes/default/template/search.tpl +++ b/themes/default/template/search.tpl @@ -14,6 +14,7 @@ {/literal}{/footer_script} *} +{if isset($MENUBAR)}{$MENUBAR}{/if}
                    @@ -22,9 +23,6 @@
                  •  {'Help'|@translate}
                  • -
                  • -  {'Home'|@translate} -
                  • {'Search'|@translate}

                    diff --git a/themes/default/template/tags.tpl b/themes/default/template/tags.tpl index f6da316f3..05b739fe4 100644 --- a/themes/default/template/tags.tpl +++ b/themes/default/template/tags.tpl @@ -1,3 +1,4 @@ +{if isset($MENUBAR)}{$MENUBAR}{/if}
                    @@ -12,9 +13,6 @@  {'letters'|@translate} {/if} -
                  • -  {'Home'|@translate} -
                  • {'Tags'|@translate}

                    diff --git a/themes/default/theme.css b/themes/default/theme.css index 1c7b075bb..d372d1d33 100644 --- a/themes/default/theme.css +++ b/themes/default/theme.css @@ -89,11 +89,6 @@ * Content */ .content { - margin: 1em; -} - -#theCategoryPage .content -{ margin-left: 20em; /* = #menubar width + 2em */ } @@ -411,6 +406,16 @@ TD.calDayHead { background: url('icon/rating-stars.gif') no-repeat 0 center; width:16px; } +/* only if menubar is shown */ +.pictureContent { + margin-left:20em; +} +.pictureContent #imageToolBar, +.pictureContent #theImage, +.pictureContent hr.separation { + clear:none; +} + /** * Default Layout -- cgit v1.2.3