]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/head.tmpl
Bugfix: Some <link rel=...> links in Mozilla/iCab were always linking
[SourceForge/phpwiki.git] / themes / default / templates / head.tmpl
1 <?php  // -*-html-*-
2   rcs_id('$Id: head.tmpl,v 1.11 2003-11-21 23:06:12 carstenklapp 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 <?php if (!empty($PAGE_DESCRIPTION)) { ?>
9 <meta name="description" content="<?=$PAGE_DESCRIPTION?>" />
10 <?php } ?>
11 <?php if (!empty($PAGE_KEYWORDS)) { ?>
12 <meta name="keywords" content="<?=$PAGE_KEYWORDS?>" />
13 <?php } ?>
14 <meta name="language" content="<?=$LANG?>" />
15 <meta name="document-type" content="Public" />
16 <meta name="document-rating" content="General" />
17 <meta name="generator" content="phpWiki" />
18 <meta name="PHPWIKI_VERSION" content="<?=PHPWIKI_VERSION?>" />
19 <base href="<?=PHPWIKI_BASE_URL?>" />
20 <link rel="shortcut icon" href="<?=$Theme->getImageURL('favicon.ico')?>" />
21 <?php /**
22        * Additional navigation links are provided here in the html header for browsers
23        * which support them: Mozilla, iCab, Amaya (and certain versions of Opera??).
24        *
25        * See http://www.w3.org/TR/html401/struct/links.html#edef-LINK
26        *     http://www.euronet.nl/~tekelenb/WWW/LINK/index.html
27        */ ?>
28 <?php /* The next few lines are wrapped in an odd manner to allow gettext string extraction: cd locale;make */ ?>
29 <link rel="home" title="<?=HOME_PAGE?>" href="<?=WikiURL(HOME_PAGE)?>" />
30 <link rel="help" title="<?=_("HowToUseWiki")?>" href="<?=WikiURL(
31 _("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(
39 _("FindPage"))?>" />
40 <?php /**
41        * Provide alternate variations of the page content:
42        * 'viewsource' and 'browse'.
43        * 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        * Link tag for RSS auto-discovery.  See
60        * http://diveintomark.org/archives/2002/05/30.html#rss_autodiscovery
61        * http://www.oreillynet.com/cs/weblog/view/wlg/1475
62        */
63 ?>
64 <link rel="alternate" type="application/rss+xml" title="RSS" href="<?=WikiURL(RECENT_CHANGES, array('format' => 'rss'))?>" />
65
66 <?php /**
67        * Add some user-specific links.
68        */ ?>
69 <?php if (!$user->isSignedIn()) {
70       /* For users not signed in */ ?>
71 <link rel="bookmark" title="<?=_("SandBox")?>" href="<?=WikiURL(
72 _("SandBox"))?>" />
73 <link rel="bookmark" title="<?=_("WikiWikiWeb")?>" href="<?=WikiURL(
74 _("WikiWikiWeb"))?>" />
75 <?php } ?>
76
77 <?php if ($user->isadmin()) {
78       /* Only for the Administrator */ ?>
79 <link rel="bookmark" title="<?=_("PhpWikiAdministration")?>" href="<?=WikiURL(
80 _("PhpWikiAdministration"))?>" />
81 <?php } ?>
82
83 <?php if ($user->isSignedIn()) {
84       /* For signed-in users */ ?>
85 <link rel="bookmark" title="<?=_("UserPreferences")?>" href="<?=WikiURL(
86 _("UserPreferences"))?>" />
87 <?php /* User's calendar page
88        */
89       $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR ._("Calendar");
90       $UserCalPageUrl = WikiURL($UserCalPageTitle);
91       ?>
92 <link rel="bookmark" title="<?= $UserCalPageTitle ?>" href="<?= $UserCalPageUrl ?>" />
93 <?php /* Today's calendar page for the user if it exists
94        */
95       $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time()); //FIXME
96       $dbi = $request->getDbh();
97       if ($dbi->isWikiPage($UserCalPageTodayTitle)) {
98           $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
99           ?>
100 <link rel="bookmark" title="<?= $UserCalPageTodayTitle ?>" href="<?= $UserCalPageTodayUrl ?>" />
101 <?php } ?>
102 <?php } //end of links for signed-in user ?>
103
104 <?= $Theme->getCSS() ?>
105 <?php
106   // avoid redundant bookmark title for custom home page
107   if ($page->getName() == WIKI_NAME && HOME_PAGE == WIKI_NAME)
108       $pagetitle = "";
109   else
110       $pagetitle = " - ". AsString($TITLE);
111 ?>
112 <title><?=WIKI_NAME.$pagetitle?></title>
113 </head>
114
115 <?php
116 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -                         
117 // $Log: not supported by cvs2svn $
118 // Revision 1.10  2003/03/07 20:51:59  dairiki
119 // New feature: Automatic extraction of keywords (for the meta keywords tag)
120 // from Category* and Topic* links on each page.
121 //
122 // Revision 1.9  2003/03/07 02:45:51  dairiki
123 // Rename BASE_URL to PHPWIKI_BASE_URL.  Lycos pre-defines BASE_URL (to
124 // the wrong thing).
125 //
126 // Revision 1.8  2003/03/05 21:38:15  dairiki
127 // More HTML comment reduction patches by "Klaus-Guenter Leiss"
128 // <Leiss.Klaus-Guenter@epost.de>
129 //
130 // (With a few adjustments by me.  Any bugs are probably my fault.)
131 //
132 // Revision 1.7  2003/02/26 22:27:17  dairiki
133 // Fix and refactor FrameInclude plugin (more or less).
134 //
135 // (This should now generate valid HTML.  Woohoo!)
136 //
137 // The output when using the Sidebar theme is ugly enough that it should
138 // be considered broken.  (But the Sidebar theme appears pretty broken in
139 // general right now.)
140 //
141 // (Personal comment (not to be taken personally): I must say that I
142 // remain unconvinced of the usefulness of this plugin.)
143 //
144 // Revision 1.6  2003/01/11 22:29:47  carstenklapp
145 // Tweak redundant bookmark title when browsing a custom home page with
146 // the same name as the wiki (i.e. avoid titles like "MyWiki - MyWiki"
147 // when HOME_PAGE==WIKI_NAME)
148 //
149 ?>