Changeset 18668


Ignore:
Timestamp:
Oct 16, 2012, 9:59:08 PM (11 years ago)
Author:
rvelices
Message:

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

Location:
branches/2.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4/include/functions_html.inc.php

    r17749 r18668  
    435435{
    436436  global $page;
    437   $title = count($page['tags']) > 1 ? l10n('Tag') : l10n('Tag');
    438   $title.= ' ';
     437  $title = '<a href="'.get_root_url().'tags.php" title="'.l10n('display available tags').'">'
     438    . l10n( count($page['tags']) > 1 ? 'Tags' : 'Tag' )
     439    . '</a> ';
    439440
    440441  for ($i=0; $i<count($page['tags']); $i++)
     
    455456      .'</a>';
    456457
    457     $remove_url = null;
    458     if (count($page['tags']) == 1)
    459     {
    460       $remove_url = get_root_url().'tags.php';
    461     }
    462     else
     458    if (count($page['tags']) > 2)
    463459    {
    464460      $other_tags = $page['tags'];
     
    469465          )
    470466        );
    471     }
    472 
    473     $title.=
    474       '<a href="'.$remove_url.'" style="border:none;" title="'
    475       .l10n('remove this tag from the list')
    476       .'"><img src="'
    477         .get_root_url().get_themeconf('icon_dir').'/remove_s.png'
    478       .'" alt="x" style="vertical-align:bottom;">'
    479       .'</a>';
     467
     468      $title.=
     469        '<a href="'.$remove_url.'" style="border:none;" title="'
     470        .l10n('remove this tag from the list')
     471        .'"><img src="'
     472          .get_root_url().get_themeconf('icon_dir').'/remove_s.png'
     473        .'" alt="x" style="vertical-align:bottom;">'
     474        .'</a>';
     475    }
    480476  }
    481477  return $title;
  • branches/2.4/index.php

    r16988 r18668  
    100100else
    101101{
    102   $canonical_url = duplicate_index_url();
     102  $start = $page['nb_image_page'] * round($page['start'] / $page['nb_image_page']);
     103  if ($start>0 && $start >= count($page['items']) )
     104  {
     105    $start -= $page['nb_image_page'];
     106  }
     107  $canonical_url = duplicate_index_url(array('start' => $start));
    103108}
    104109$template->assign('U_CANONICAL', $canonical_url);
Note: See TracChangeset for help on using the changeset viewer.