]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/head.tmpl
fixed login, theme selection, UserPreferences.
[SourceForge/phpwiki.git] / themes / default / templates / head.tmpl
1 <?php  // -*-html-*-
2 /* $Id: head.tmpl,v 1.1 2002-08-23 18:29:34 rurban Exp $
3  *
4  * This template is responsible mainly for the outer level <html> stuff and the <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: head.tmpl,v 1.1 2002-08-23 18:29:34 rurban 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 <?php /**
23        * Additional navigation links are provided here in the html header for browsers
24        * which support them: Mozilla, iCab, Amaya (and certain versions of Opera??).
25        *
26        * See http://www.w3.org/TR/html401/struct/links.html#edef-LINK
27        *     http://www.euronet.nl/~tekelenb/WWW/LINK/index.html
28        */ ?>
29 <link rel="shortcut icon" href="<?=$Theme->getImageURL('favicon.ico')?>" />
30 <link rel="home" title="<?=HOME_PAGE?>" href="<?=WikiURL(HOME_PAGE)?>" />
31 <link rel="help" title="<?=_("HowToUseWiki")?>" href="<?=WikiURL(_("HowToUseWiki"))?>" />
32 <link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" />
33 <?php
34       $wikiadminName = _("The PhpWiki Programming Team");
35       $wikiadminUrl = "http://phpwiki.sourceforge.net/phpwiki/ThePhpWikiProgrammingTeam";
36       ?>
37 <link rel="author" title="<?= $wikiadminName ?>" href="<?= $wikiadminUrl ?>" />
38 <link rel="search" title="<?=_("FindPage")?>" href="<?=WikiURL(_("FindPage"))?>" />
39 <?php /**
40        * Provide alternate variations of the page content:
41        * 'viewsource' and 'browse'.
42        * RSS or translated pages could go here too.
43        */
44       if (!empty($revision)) {
45           $args = $request->getargs();
46           $action = $args['action'];
47           if (!($action == "viewsource")) {
48             $alternatelinkTitle = fmt("%s: %s",_("View Source"), $page->getName());
49             $alternatelinkUrl = WikiURL($revision, array('action' => 'viewsource'));
50           }
51           if (!($action == "browse")) {
52             $alternatelinkTitle = $page->getName();
53             $alternatelinkUrl = WikiURL($revision, array('action' => 'browse'));
54           } ?>
55 <link rel="alternate" title="<?= $alternatelinkTitle ?>" href="<?= $alternatelinkUrl ?>" />
56 <?php } ?>
57
58 <?php /**
59        * Add some user-specific links.
60        */ ?>
61 <?php if (!$user->isSignedIn()) {
62       /* For users not signed in */ ?>
63 <link rel="bookmark" title="<?=_("SandBox")?>" href="<?=WikiURL(_("SandBox"))?>" />
64 <link rel="bookmark" title="<?=_("WikiWikiWeb")?>" href="<?=WikiURL(_("WikiWikiWeb"))?>" />
65 <?php } ?>
66
67 <?php if ($user->isadmin()) {
68       /* Only for the Administrator */ ?>
69 <link rel="bookmark" title="<?=_("PhpWikiAdministration")?>" href="<?=WikiURL(_("PhpWikiAdministration"))?>" />
70 <?php } ?>
71
72 <?php if ($user->isSignedIn()) {
73       /* For signed-in users */ ?>
74 <link rel="bookmark" title="<?=_("UserPreferences")?>" href="<?=WikiURL(_("UserPreferences"))?>" />
75 <?php /* User's calendar page
76        */
77       $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR ._("Calendar");
78       $UserCalPageUrl = WikiURL($UserCalPageTitle);
79       ?>
80 <link rel="bookmark" title="<?= $UserCalPageTitle ?>" href="<?= $UserCalPageUrl ?>" />
81 <?php /* Today's calendar page for the user if it exists
82        */
83       $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time()); //FIXME
84       $dbi = $request->getDbh();
85       if ($dbi->isWikiPage($UserCalPageTodayTitle)) {
86           $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
87           ?>
88 <link rel="bookmark" title="<?= $UserCalPageTodayTitle ?>" href="<?= $UserCalPageTodayUrl ?>" />
89 <?php } ?>
90 <?php } //end of links for signed-in user ?>
91
92 <?= $Theme->getCSS() ?>
93 <title><?=WIKI_NAME?> - <?=AsString($TITLE)?></title>
94 </head>