]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/head.tmpl
Added RSS Auto-discover - see comments for details
[SourceForge/phpwiki.git] / themes / default / templates / head.tmpl
1 <?php  // -*-html-*-
2 /* $Id: head.tmpl,v 1.3 2002-10-12 19:11:44 lakka 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.3 2002-10-12 19:11:44 lakka 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="language" content="<?=$LANG?>" />
21 <meta name="document-type" content="Public" />
22 <meta name="document-rating" content="General" />
23 <meta name="generator" content="phpWiki" />
24 <meta name="PHPWIKI_VERSION" content="<?=PHPWIKI_VERSION?>" />
25 <base href="<?=BASE_URL?>" />
26 <link rel="shortcut icon" href="<?=$Theme->getImageURL('favicon.ico')?>" />
27 <?php /**
28        * Additional navigation links are provided here in the html header for browsers
29        * which support them: Mozilla, iCab, Amaya (and certain versions of Opera??).
30        *
31        * See http://www.w3.org/TR/html401/struct/links.html#edef-LINK
32        *     http://www.euronet.nl/~tekelenb/WWW/LINK/index.html
33        */ ?>
34 <link rel="home" title="<?=HOME_PAGE?>" href="<?=WikiURL(HOME_PAGE)?>" />
35 <link rel="help" title="<?=_("HowToUseWiki")?>" href="<?=WikiURL(_("HowToUseWiki"))?>" />
36 <link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" />
37 <?php
38       $wikiadminName = _("The PhpWiki Programming Team");
39       $wikiadminUrl = "http://phpwiki.sourceforge.net/phpwiki/ThePhpWikiProgrammingTeam";
40       ?>
41 <link rel="author" title="<?= $wikiadminName ?>" href="<?= $wikiadminUrl ?>" />
42 <link rel="search" title="<?=_("FindPage")?>" href="<?=WikiURL(_("FindPage"))?>" />
43 <?php /**
44        * Provide alternate variations of the page content:
45        * 'viewsource' and 'browse'.
46        * Translated pages could go here too.
47        */
48       if (!empty($revision)) {
49           $args = $request->getargs();
50           $action = $args['action'];
51           if (!($action == "viewsource")) {
52             $alternatelinkTitle = fmt("%s: %s",_("View Source"), $page->getName());
53             $alternatelinkUrl = WikiURL($revision, array('action' => 'viewsource'));
54           }
55           if (!($action == "browse")) {
56             $alternatelinkTitle = $page->getName();
57             $alternatelinkUrl = WikiURL($revision, array('action' => 'browse'));
58           } ?>
59 <link rel="alternate" title="<?= $alternatelinkTitle ?>" href="<?= $alternatelinkUrl ?>" />
60 <?php }
61       /**
62        * Link tag for RSS auto-discovery.  See
63        * http://diveintomark.org/archives/2002/05/30.html#rss_autodiscovery
64        * http://www.oreillynet.com/cs/weblog/view/wlg/1475
65        */
66 ?>
67 <link rel="alternate" type="application/rss+xml" title="RSS" href="<?=WikiURL(RECENT_CHANGES, array('format' => 'rss')?>" />
68
69 <?php /**
70        * Add some user-specific links.
71        */ ?>
72 <?php if (!$user->isSignedIn()) {
73       /* For users not signed in */ ?>
74 <link rel="bookmark" title="<?=_("SandBox")?>" href="<?=WikiURL(_("SandBox"))?>" />
75 <link rel="bookmark" title="<?=_("WikiWikiWeb")?>" href="<?=WikiURL(_("WikiWikiWeb"))?>" />
76 <?php } ?>
77
78 <?php if ($user->isadmin()) {
79       /* Only for the Administrator */ ?>
80 <link rel="bookmark" title="<?=_("PhpWikiAdministration")?>" href="<?=WikiURL(_("PhpWikiAdministration"))?>" />
81 <?php } ?>
82
83 <?php if ($user->isSignedIn()) {
84       /* For signed-in users */ ?>
85 <link rel="bookmark" title="<?=_("UserPreferences")?>" href="<?=WikiURL(_("UserPreferences"))?>" />
86 <?php /* User's calendar page
87        */
88       $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR ._("Calendar");
89       $UserCalPageUrl = WikiURL($UserCalPageTitle);
90       ?>
91 <link rel="bookmark" title="<?= $UserCalPageTitle ?>" href="<?= $UserCalPageUrl ?>" />
92 <?php /* Today's calendar page for the user if it exists
93        */
94       $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time()); //FIXME
95       $dbi = $request->getDbh();
96       if ($dbi->isWikiPage($UserCalPageTodayTitle)) {
97           $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
98           ?>
99 <link rel="bookmark" title="<?= $UserCalPageTodayTitle ?>" href="<?= $UserCalPageTodayUrl ?>" />
100 <?php } ?>
101 <?php } //end of links for signed-in user ?>
102
103 <?= $Theme->getCSS() ?>
104 <title><?=WIKI_NAME?> - <?=AsString($TITLE)?></title>
105 </head>