]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/head.tmpl
Fix and refactor FrameInclude plugin (more or less).
[SourceForge/phpwiki.git] / themes / default / templates / head.tmpl
1 <?php  // -*-html-*- ?>
2 <head>
3 <!-- $Id: head.tmpl,v 1.7 2003-02-26 22:27:17 dairiki Exp $ -->
4 <meta http-equiv="Content-Type" content="text/html; charset=<?=CHARSET?>" />
5 <?php $ROBOTS_CONTENT = $ROBOTS_META ? $ROBOTS_META : "noindex,nofollow"; ?>
6 <meta name="robots" content="<?= $ROBOTS_CONTENT ?>" />
7 <meta name="keywords" content="<?=split_pagename($page->getName())?>, <?=WIKI_NAME?>" />
8 <?php if (!empty($PAGE_DESCRIPTION)) { ?>
9 <meta name="description" content="<?=$PAGE_DESCRIPTION?>" />
10 <?php } ?>
11 <meta name="language" content="<?=$LANG?>" />
12 <meta name="document-type" content="Public" />
13 <meta name="document-rating" content="General" />
14 <meta name="generator" content="phpWiki" />
15 <meta name="PHPWIKI_VERSION" content="<?=PHPWIKI_VERSION?>" />
16 <base href="<?=BASE_URL?>" />
17 <link rel="shortcut icon" href="<?=$Theme->getImageURL('favicon.ico')?>" />
18 <?php /**
19        * Additional navigation links are provided here in the html header for browsers
20        * which support them: Mozilla, iCab, Amaya (and certain versions of Opera??).
21        *
22        * See http://www.w3.org/TR/html401/struct/links.html#edef-LINK
23        *     http://www.euronet.nl/~tekelenb/WWW/LINK/index.html
24        */ ?>
25 <link rel="home" title="<?=HOME_PAGE?>" href="<?=WikiURL(HOME_PAGE)?>" />
26 <link rel="help" title="<?=_("HowToUseWiki")?>" href="<?=WikiURL(_("HowToUseWiki"))?>" />
27 <link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" />
28 <?php
29       $wikiadminName = _("The PhpWiki Programming Team");
30       $wikiadminUrl = "http://phpwiki.sourceforge.net/phpwiki/ThePhpWikiProgrammingTeam";
31       ?>
32 <link rel="author" title="<?= $wikiadminName ?>" href="<?= $wikiadminUrl ?>" />
33 <link rel="search" title="<?=_("FindPage")?>" href="<?=WikiURL(_("FindPage"))?>" />
34 <?php /**
35        * Provide alternate variations of the page content:
36        * 'viewsource' and 'browse'.
37        * Translated pages could go here too.
38        */
39       if (!empty($revision)) {
40           $args = $request->getargs();
41           $action = $args['action'];
42           if (!($action == "viewsource")) {
43             $alternatelinkTitle = fmt(_("%s: %s"),_("View Source"), $page->getName());
44             $alternatelinkUrl = WikiURL($revision, array('action' => 'viewsource'));
45           }
46           if (!($action == "browse")) {
47             $alternatelinkTitle = $page->getName();
48             $alternatelinkUrl = WikiURL($revision, array('action' => 'browse'));
49           } ?>
50 <link rel="alternate" title="<?= $alternatelinkTitle ?>" href="<?= $alternatelinkUrl ?>" />
51 <?php }
52       /**
53        * Link tag for RSS auto-discovery.  See
54        * http://diveintomark.org/archives/2002/05/30.html#rss_autodiscovery
55        * http://www.oreillynet.com/cs/weblog/view/wlg/1475
56        */
57 ?>
58 <link rel="alternate" type="application/rss+xml" title="RSS" href="<?=WikiURL(RECENT_CHANGES, array('format' => 'rss'))?>" />
59
60 <?php /**
61        * Add some user-specific links.
62        */ ?>
63 <?php if (!$user->isSignedIn()) {
64       /* For users not signed in */ ?>
65 <link rel="bookmark" title="<?=_("SandBox")?>" href="<?=WikiURL(_("SandBox"))?>" />
66 <link rel="bookmark" title="<?=_("WikiWikiWeb")?>" href="<?=WikiURL(_("WikiWikiWeb"))?>" />
67 <?php } ?>
68
69 <?php if ($user->isadmin()) {
70       /* Only for the Administrator */ ?>
71 <link rel="bookmark" title="<?=_("PhpWikiAdministration")?>" href="<?=WikiURL(_("PhpWikiAdministration"))?>" />
72 <?php } ?>
73
74 <?php if ($user->isSignedIn()) {
75       /* For signed-in users */ ?>
76 <link rel="bookmark" title="<?=_("UserPreferences")?>" href="<?=WikiURL(_("UserPreferences"))?>" />
77 <?php /* User's calendar page
78        */
79       $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR ._("Calendar");
80       $UserCalPageUrl = WikiURL($UserCalPageTitle);
81       ?>
82 <link rel="bookmark" title="<?= $UserCalPageTitle ?>" href="<?= $UserCalPageUrl ?>" />
83 <?php /* Today's calendar page for the user if it exists
84        */
85       $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time()); //FIXME
86       $dbi = $request->getDbh();
87       if ($dbi->isWikiPage($UserCalPageTodayTitle)) {
88           $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
89           ?>
90 <link rel="bookmark" title="<?= $UserCalPageTodayTitle ?>" href="<?= $UserCalPageTodayUrl ?>" />
91 <?php } ?>
92 <?php } //end of links for signed-in user ?>
93
94 <?= $Theme->getCSS() ?>
95 <?php
96   // avoid redundant bookmark title for custom home page
97   if ($page->getName() == WIKI_NAME && HOME_PAGE == WIKI_NAME)
98       $pagetitle = "";
99   else
100       $pagetitle = " - ". AsString($TITLE);
101 ?>
102 <title><?=WIKI_NAME.$pagetitle?></title>
103 </head>
104
105 <?php
106 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -                         
107 // $Log: not supported by cvs2svn $
108 // Revision 1.6  2003/01/11 22:29:47  carstenklapp
109 // Tweak redundant bookmark title when browsing a custom home page with
110 // the same name as the wiki (i.e. avoid titles like "MyWiki - MyWiki"
111 // when HOME_PAGE==WIKI_NAME)
112 //
113 ?>