2 /* $Id: top.tmpl,v 1.11 2002-02-21 21:11:01 carstenklapp Exp $
4 * This template is responsible mainly for the outer level <html> stuff and the and <head>.
6 printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n", CHARSET);
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">
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?>" />
20 <meta name="PHPWIKI_VERSION" content="<?=PHPWIKI_VERSION?>" />
21 <base href="<?=BASE_URL?>" />
22 <meta http-equiv="Content-Type" content="text/html; charset=<?=CHARSET?>" />
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??).
27 * See http://www.w3.org/TR/html401/struct/links.html#edef-LINK
28 * http://www.euronet.nl/~tekelenb/WWW/LINK/index.html
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" />
35 $wikiadminName = _("The PhpWiki Programming Team");
36 $wikiadminUrl = "http://phpwiki.sourceforge.net/phpwiki/ThePhpWikiProgrammingTeam";
38 <link rel="author" title="<?= $wikiadminName ?>" href="<?= $wikiadminUrl ?>" />
39 <link rel="search" title="<?=_("FindPage")?>" href="<?=WikiURL(_("FindPage"))?>" />
41 * Provide alternate variations of the page content:
42 * 'viewsource' and 'browse'.
43 * RSS or translated pages could go here too.
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'));
52 if (!($action == "browse")) {
53 $alternatelinkTitle = $page->getName();
54 $alternatelinkUrl = WikiURL($revision, array('action' => 'browse'));
56 <link rel="alternate" title="<?= $alternatelinkTitle ?>" href="<?= $alternatelinkUrl ?>" />
60 * Add some user-specific links.
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"))?>" />
68 <?php if ($user->isadmin()) {
69 /* Only for the Administrator */ ?>
70 <link rel="bookmark" title="<?=_("PhpWikiAdministration")?>" href="<?=WikiURL(_("PhpWikiAdministration"))?>" />
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
78 $UserCalPageTitle = $user->getId() . "."._("Calendar");
79 $UserCalPageUrl = WikiURL($UserCalPageTitle);
81 <link rel="bookmark" title="<?= $UserCalPageTitle ?>" href="<?= $UserCalPageUrl ?>" />
82 <?php /* Today's calendar page for the user if it exists
84 $UserCalPageTodayTitle = $UserCalPageTitle .".". strftime("%Y-%m-%d", time()); //FIXME
85 $dbi = $request->getDbh();
86 if ($dbi->isWikiPage($UserCalPageTodayTitle)) {
87 $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
89 <link rel="bookmark" title="<?= $UserCalPageTodayTitle ?>" href="<?= $UserCalPageTodayUrl ?>" />
91 <?php } //end of links for signed-in user ?>
93 <?= $Theme->getCSS() ?>
94 <title><?=WIKI_NAME?> - <?=AsString($TITLE)?></title>
96 <?= Template('body') ?>