Changeset 1627


Ignore:
Timestamp:
Dec 2, 2006, 5:46:15 PM (17 years ago)
Author:
chrisaga
Message:

improve page header : slightly prettier title and

first implementation of meta tags and rel links (see the wiki specs)
some code improvements are still need.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/page_header.php

    r1590 r1627  
    5656    ));
    5757
     58// picture header infos
     59if (isset($header_infos))
     60{
     61  $template->assign_block_vars( 'header_meta', $header_infos);
     62}
    5863// refresh
    5964if ( isset( $refresh ) and intval($refresh) >= 0
  • trunk/index.php

    r1624 r1627  
    9898$title = $page['title'];
    9999$page['body_id'] = 'theCategoryPage';
    100 include(PHPWG_ROOT_PATH.'include/page_header.php');
    101100
    102101$template->set_filenames( array('index'=>'index.tpl') );
     
    287286      )
    288287    );
     288  $header_infos['COMMENT'] = strip_tags($page['comment']);
    289289}
    290290//------------------------------------------------------------ log informations
     
    292292
    293293trigger_action('loc_end_index');
     294include(PHPWG_ROOT_PATH.'include/page_header.php');
    294295$template->parse('index');
    295296include(PHPWG_ROOT_PATH.'include/page_tail.php');
  • trunk/picture.php

    r1612 r1627  
    458458  );
    459459}
    460 include(PHPWG_ROOT_PATH.'include/page_header.php');
    461460$template->set_filenames(array('picture'=>'picture.tpl'));
    462461
     
    591590
    592591//--------------------------------------------------------- picture information
     592$header_infos = array();        //for html header use
    593593// legend
    594594if (isset($picture['current']['comment'])
     
    600600      'COMMENT_IMG' => nl2br($picture['current']['comment'])
    601601      ));
     602  $header_infos['COMMENT'] = strip_tags($picture['current']['comment']);
    602603}
    603604
     
    616617//       .'">'.$picture['current']['author'].'</a>';
    617618    $picture['current']['author'];
     619  $header_infos['INFO_AUTHOR'] = $picture['current']['author'];
    618620}
    619621else
     
    703705{
    704706  $tags = array();
     707  $tag_names = array();
    705708
    706709  while ($row = mysql_fetch_array($result))
     
    721724      .'">'.$row['name'].'</a>'
    722725      );
     726    array_push( $tag_names, $row['name'] );
    723727  }
    724728
    725729  $infos['INFO_TAGS'] = implode(', ', $tags);
     730  $header_infos['INFO_TAGS'] = implode(', ', $tag_names);
    726731}
    727732else
     
    774779pwg_log('picture', $page['title'], $picture['current']['file']);
    775780
     781include(PHPWG_ROOT_PATH.'include/page_header.php');
    776782$template->parse('picture');
    777783include(PHPWG_ROOT_PATH.'include/page_tail.php');
  • trunk/search.php

    r1314 r1627  
    174174$title= $lang['search_title'];
    175175$page['body_id'] = 'theSearchPage';
    176 include(PHPWG_ROOT_PATH.'include/page_header.php');
    177176
    178177$template->set_filenames( array('search'=>'search.tpl') );
     
    238237//------------------------------------------------------------ log informations
    239238pwg_log( 'search', $title );
     239include(PHPWG_ROOT_PATH.'include/page_header.php');
    240240$template->parse('search');
    241241include(PHPWG_ROOT_PATH.'include/page_tail.php');
  • trunk/template/yoga/header.tpl

    r1590 r1627  
    44<head>
    55<meta http-equiv="Content-Type" content="text/html; charset={CONTENT_ENCODING}">
     6<meta name="robots" content="index, follow">
     7<meta name="generator" content="PhpWebGallery (aka PWG), see www.phpwebgallery.net" />
     8<!-- BEGIN header_meta -->
     9<meta name="author" content="{header_meta.INFO_AUTHOR}">
     10<meta name="keywords" content="{header_meta.INFO_TAGS}">
     11<meta name="description" content="{header_meta.COMMENT}">
     12<!-- END header_meta -->
     13<title>{GALLERY_TITLE} :: {PAGE_TITLE}</title>
    614<link rel="shortcut icon" type="image/x-icon" href="{pwg_root}template-common/favicon.ico">
     15<link rel="start" title="{lang:home}" href="{U_HOME}" >
     16<link rel="search" title="{lang:search}" href="{pwg_root}search.php" >
     17<!-- BEGIN first -->
     18<link rel="first" title="{lang:first_page}" href="{first.U_IMG}" >
     19<link rel="up" title="{lang:thumbails}" href="{U_UP}" >
     20<!-- END first -->
     21<!-- BEGIN previous -->
     22<link rel="prev" title="{lang:previous_page}" href="{previous.U_IMG}" >
     23<!-- END previous -->
     24<!-- BEGIN next -->
     25<link rel="next" title="{lang:next_page}" href="{next.U_IMG}" >
     26<!-- END next -->
     27<!-- BEGIN last -->
     28<link rel="last" title="{lang:last_page}" href="{last.U_IMG}" >
     29<link rel="up" title="{lang:thumbails}" href="{U_UP}" >
     30<!-- END last -->
    731<link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/layout.css">
    832<!-- the next css is used to fix khtml (Konqueror/Safari) issue
     
    2246<meta http-equiv="refresh" content="{REFRESH_TIME};url={U_REFRESH}">
    2347<!-- END refresh -->
    24 <title>{GALLERY_TITLE}:{PAGE_TITLE}</title>
    2548<script type="text/javascript" src="{pwg_root}template-common/scripts.js"></script>
    2649<!--[if lt IE 7]>
Note: See TracChangeset for help on using the changeset viewer.