]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/top.tmpl
bugfix
[SourceForge/phpwiki.git] / themes / default / templates / top.tmpl
1 <?php  // -*-html-*-
2 /* $Id: top.tmpl,v 1.11 2002-02-21 21:11:01 carstenklapp Exp $
3  *
4  * This template is responsible mainly for the outer level <html> stuff and the and <head>.
5  */
6 printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n", CHARSET);
7 ?>
8 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
9   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
10 <html xmlns="http://www.w3.org/1999/xhtml">
11 <head>
12 <!-- $Id: top.tmpl,v 1.11 2002-02-21 21:11:01 carstenklapp Exp $ -->
13 <meta http-equiv="Content-Type" content="text/html; charset=<?=CHARSET?>" />
14 <?php $ROBOTS_CONTENT = $ROBOTS_META ? $ROBOTS_META : "noindex,nofollow"; ?>
15 <meta name="robots" content="<?= $ROBOTS_CONTENT ?>" />
16 <meta name="keywords" content="<?=split_pagename($page->getName())?>, <?=WIKI_NAME?>" />
17 <?php if (!empty($PAGE_DESCRIPTION)) { ?>
18 <meta name="description" content="<?=$PAGE_DESCRIPTION?>" />
19 <?php } ?>
20 <meta name="PHPWIKI_VERSION" content="<?=PHPWIKI_VERSION?>" />
21 <base href="<?=BASE_URL?>" />
22 <meta http-equiv="Content-Type" content="text/html; charset=<?=CHARSET?>" />
23 <?php /**
24        * Additional navigation links are provided here in the html header for browsers
25        * which support them: Mozilla, iCab, Amaya (and certain versions of Opera??).
26        *
27        * See http://www.w3.org/TR/html401/struct/links.html#edef-LINK
28        *     http://www.euronet.nl/~tekelenb/WWW/LINK/index.html
29        */ ?>
30 <link rel="shortcut icon" href="<?=$Theme->getImageURL('favicon.ico')?>" />
31 <link rel="home" title="<?=HomePage?>" href="<?=WikiURL(HomePage)?>" />
32 <link rel="help" title="<?=_("HowToUseWiki")?>" href="<?=WikiURL(_("HowToUseWiki"))?>" />
33 <link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" />
34 <?php
35       $wikiadminName = _("The PhpWiki Programming Team");
36       $wikiadminUrl = "http://phpwiki.sourceforge.net/phpwiki/ThePhpWikiProgrammingTeam";
37       ?>
38 <link rel="author" title="<?= $wikiadminName ?>" href="<?= $wikiadminUrl ?>" />
39 <link rel="search" title="<?=_("FindPage")?>" href="<?=WikiURL(_("FindPage"))?>" />
40 <?php /**
41        * Provide alternate variations of the page content:
42        * 'viewsource' and 'browse'.
43        * RSS or translated pages could go here too.
44        */
45       if (!empty($revision)) {
46           $args = $request->getargs();
47           $action = $args['action'];
48           if (!($action == "viewsource")) {
49             $alternatelinkTitle = fmt("%s: %s",_("View Source"), $page->getName());
50             $alternatelinkUrl = WikiURL($revision, array('action' => 'viewsource'));
51           }
52           if (!($action == "browse")) {
53             $alternatelinkTitle = $page->getName();
54             $alternatelinkUrl = WikiURL($revision, array('action' => 'browse'));
55           } ?>
56 <link rel="alternate" title="<?= $alternatelinkTitle ?>" href="<?= $alternatelinkUrl ?>" />
57 <?php } ?>
58
59 <?php /**
60        * Add some user-specific links.
61        */ ?>
62 <?php if (!$user->isSignedIn()) {
63       /* For users not signed in */ ?>
64 <link rel="bookmark" title="<?=_("SandBox")?>" href="<?=WikiURL(_("SandBox"))?>" />
65 <link rel="bookmark" title="<?=_("WikiWikiWeb")?>" href="<?=WikiURL(_("WikiWikiWeb"))?>" />
66 <?php } ?>
67
68 <?php if ($user->isadmin()) {
69       /* Only for the Administrator */ ?>
70 <link rel="bookmark" title="<?=_("PhpWikiAdministration")?>" href="<?=WikiURL(_("PhpWikiAdministration"))?>" />
71 <?php } ?>
72
73 <?php if ($user->isSignedIn()) {
74       /* For signed-in users */ ?>
75 <link rel="bookmark" title="<?=_("UserPreferences")?>" href="<?=WikiURL(_("UserPreferences"))?>" />
76 <?php /* User's calendar page
77        */
78       $UserCalPageTitle = $user->getId() . "."._("Calendar");
79       $UserCalPageUrl = WikiURL($UserCalPageTitle);
80       ?>
81 <link rel="bookmark" title="<?= $UserCalPageTitle ?>" href="<?= $UserCalPageUrl ?>" />
82 <?php /* Today's calendar page for the user if it exists
83        */
84       $UserCalPageTodayTitle = $UserCalPageTitle .".". strftime("%Y-%m-%d", time()); //FIXME
85       $dbi = $request->getDbh();
86       if ($dbi->isWikiPage($UserCalPageTodayTitle)) {
87           $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
88           ?>
89 <link rel="bookmark" title="<?= $UserCalPageTodayTitle ?>" href="<?= $UserCalPageTodayUrl ?>" />
90 <?php } ?>
91 <?php } //end of links for signed-in user ?>
92
93 <?= $Theme->getCSS() ?>
94 <title><?=WIKI_NAME?> - <?=AsString($TITLE)?></title>
95 </head>
96 <?= Template('body') ?>
97 <!-- phpwiki source:
98 <?=$RCS_IDS?>
99 -->
100 </html>