diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/config_default.inc.php | 9 | ||||
-rw-r--r-- | include/functions_html.inc.php | 12 | ||||
-rw-r--r-- | include/section_init.inc.php | 8 |
3 files changed, 19 insertions, 10 deletions
diff --git a/include/config_default.inc.php b/include/config_default.inc.php index 4609c67b8..3946d82f5 100644 --- a/include/config_default.inc.php +++ b/include/config_default.inc.php @@ -43,9 +43,6 @@ // | misc | // +-----------------------------------------------------------------------+ -// home_page : relative url of your homepage. Empty by default. It points to the index of the gallery. -$conf['home_page'] = ''; - // order_by : how to change the order of display for images in a category ? // // There are several fields that can order the display : @@ -329,6 +326,12 @@ $conf['double_password_type_in_admin'] = false; // 'filename' $conf['uniqueness_mode'] = 'md5sum'; +// home_page : relative url of the homepage. Empty by default. +// It points to the index of the gallery. +// This parameter is used if home page is not index.php of the gallery. +// We suggest avoid the names "index.htm" or "index.html" if you set $conf['php_extension_in_urls'] to false. +$conf['home_page'] = ''; + // +-----------------------------------------------------------------------+ // | metadata | // +-----------------------------------------------------------------------+ diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index afdf41952..8ea174076 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -239,7 +239,8 @@ function get_cat_display_name($cat_informations, { global $conf; - $output = '<a href="'.PHPWG_ROOT_PATH.$conf['home_page'].'">'.l10n('no_category').'</a>'; + $output = ''; + $is_first = true; foreach ($cat_informations as $cat) { @@ -253,7 +254,14 @@ function get_cat_display_name($cat_informations, 'get_cat_display_name' ); - $output.= $conf['level_separator']; + if ($is_first) + { + $is_first=false; + } + else + { + $output.= $conf['level_separator']; + } if ( !isset($url) ) { diff --git a/include/section_init.inc.php b/include/section_init.inc.php index 6264d0c28..d8713c09c 100644 --- a/include/section_init.inc.php +++ b/include/section_init.inc.php @@ -220,6 +220,8 @@ $forbidden = get_sql_condition_FandF( // +-----------------------------------------------------------------------+ if ('categories' == $page['section']) { + $page['title'] = '<a href="'.get_absolute_root_url().$conf['home_page'].'">'.l10n('home').'</a>'; + if (isset($page['category'])) { $page = array_merge( @@ -232,14 +234,10 @@ if ('categories' == $page['section']) 'main_page_category_description' ), 'title' => - get_cat_display_name($page['category']['upper_names'], '', false), + $page['title'].$conf['level_separator'].get_cat_display_name($page['category']['upper_names'], '', false), ) ); } - else - { - $page['title'] = '<a href="'.PHPWG_ROOT_PATH.$conf['home_page'].'">'.l10n('no_category').'</a>'; - } if ( |