Changeset 18637


Ignore:
Timestamp:
Oct 13, 2012, 5:55:35 PM (12 years ago)
Author:
rvelices
Message:

bug 2772: remove "Home" from html title pages on index pages

Location:
trunk
Files:
6 edited

Legend:

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

    r15316 r18637  
    182182//    );
    183183$conf['random_index_redirect'] = array();
    184 
    185 // reverse_home_title: if Piwigo is your home page for a better robot index
    186 // we recommend to set it true (Only index page will reverse its title)
    187 $conf['reverse_home_title'] = false;
    188184
    189185// List of notes to display on all header page
  • trunk/include/page_header.php

    r15578 r18637  
    4848      isset($page['body_id']) ?
    4949        $page['body_id'] : '',
    50 
    51     'REVERSE' =>
    52       (isset($conf['reverse_home_title']) and $conf['reverse_home_title']) ?
    53         true : false,
    5450
    5551    'CONTENT_ENCODING' => get_pwg_charset(),
  • trunk/include/section_init.inc.php

    r18462 r18637  
    562562  if (!empty($page['title']))
    563563        {
    564           $page['title'] = $conf['level_separator'].$page['title'];
     564    $page['section_title'] = '<a href="'.get_gallery_home_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].$page['title'];
    565565        }
    566   $page['title'] = '<a href="'.get_gallery_home_url().'">'.l10n('Home').'</a>'.$page['title'];
     566  else
     567  {
     568    if ('picture'==script_basename())
     569    {
     570      $used_title = l10n('Home');
     571      $used_link = duplicate_index_url(array('start'=>0));
     572    }
     573    else
     574    {
     575      $used_title = @$page['is_homepage'] ? $conf['gallery_title'] :l10n('Home');
     576      $used_link = get_gallery_home_url();
     577    }
     578    $page['section_title'] = $page['title'] = '<a href="'.$used_link.'">'.$used_title.'</a>';
     579  }
    567580}
    568581
  • trunk/index.php

    r18636 r18637  
    112112$template->set_filenames( array('index'=>'index.tpl') );
    113113//-------------------------------------------------------------- category title
    114 $template_title = $page['title'];
     114$template_title = $page['section_title'];
    115115if (count($page['items']) > 0)
    116116{
  • trunk/picture.php

    r17345 r18637  
    737737$template->assign(
    738738  array(
    739     'SECTION_TITLE' => $page['title'],
     739    'SECTION_TITLE' => $page['section_title'],
    740740    'PHOTO' => $title_nb,
    741741    'IS_HOME' => ('categories'==$page['section'] and !isset($page['category']) ),
  • trunk/themes/default/template/header.tpl

    r13763 r18637  
    1717{/if}
    1818{/if}
    19 
    20 {if (isset($REVERSE) and $REVERSE and $PAGE_TITLE == l10n('Home'))}
    21 <title>{$GALLERY_TITLE} | {$PAGE_TITLE}</title>{else}
    22 <title>{$PAGE_TITLE} | {$GALLERY_TITLE}</title>{/if}
     19<title>{$PAGE_TITLE}{if $PAGE_TITLE!=$GALLERY_TITLE} | {$GALLERY_TITLE}{/if}</title>
    2320<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
    2421
Note: See TracChangeset for help on using the changeset viewer.