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