diff options
author | rvelices <rv-github@modusoptimus.com> | 2012-10-16 19:59:08 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2012-10-16 19:59:08 +0000 |
commit | afb83c772dee77b6699a0d51d46a1d7f5c5c5c66 (patch) | |
tree | ae00c18d065b801f1ac97affe6d7d0a172478b92 | |
parent | 7ed296715ea3e16536961cf219dfe5a9a21c997e (diff) |
merge -r18667 from trunk - improved page title when viewing tags, fix canonical url on index page if the webmaster changes the default number of thumbnails per page
git-svn-id: http://piwigo.org/svn/branches/2.4@18668 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | include/functions_html.inc.php | 28 | ||||
-rw-r--r-- | index.php | 7 |
2 files changed, 18 insertions, 17 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index 8450b4c82..6ee406344 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -434,8 +434,9 @@ $btrace_msg function get_tags_content_title() { global $page; - $title = count($page['tags']) > 1 ? l10n('Tag') : l10n('Tag'); - $title.= ' '; + $title = '<a href="'.get_root_url().'tags.php" title="'.l10n('display available tags').'">' + . l10n( count($page['tags']) > 1 ? 'Tags' : 'Tag' ) + . '</a> '; for ($i=0; $i<count($page['tags']); $i++) { @@ -454,12 +455,7 @@ function get_tags_content_title() .trigger_event('render_tag_name', $page['tags'][$i]['name']) .'</a>'; - $remove_url = null; - if (count($page['tags']) == 1) - { - $remove_url = get_root_url().'tags.php'; - } - else + if (count($page['tags']) > 2) { $other_tags = $page['tags']; unset($other_tags[$i]); @@ -468,15 +464,15 @@ function get_tags_content_title() 'tags' => $other_tags ) ); - } - $title.= - '<a href="'.$remove_url.'" style="border:none;" title="' - .l10n('remove this tag from the list') - .'"><img src="' - .get_root_url().get_themeconf('icon_dir').'/remove_s.png' - .'" alt="x" style="vertical-align:bottom;">' - .'</a>'; + $title.= + '<a href="'.$remove_url.'" style="border:none;" title="' + .l10n('remove this tag from the list') + .'"><img src="' + .get_root_url().get_themeconf('icon_dir').'/remove_s.png' + .'" alt="x" style="vertical-align:bottom;">' + .'</a>'; + } } return $title; } @@ -99,7 +99,12 @@ if (isset($page['is_homepage']) and $page['is_homepage']) } else { - $canonical_url = duplicate_index_url(); + $start = $page['nb_image_page'] * round($page['start'] / $page['nb_image_page']); + if ($start>0 && $start >= count($page['items']) ) + { + $start -= $page['nb_image_page']; + } + $canonical_url = duplicate_index_url(array('start' => $start)); } $template->assign('U_CANONICAL', $canonical_url); |