Changeset 18667


Ignore:
Timestamp:
10/16/12 21:58:12 (7 years ago)
Author:
rvelices
Message:
  • improved page title when viewing tags, fix canonical url on index page if the webmaster changes the default number of thumbnails per page
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_html.inc.php

    r17975 r18667  
    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; 
  • trunk/index.php

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