]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/head.tmpl
application/xhtml+xml support (esp. for MathML/SVG)
[SourceForge/phpwiki.git] / themes / default / templates / head.tmpl
1 <?php  // -*-html-*-
2   rcs_id('$Id: head.tmpl,v 1.19 2004-06-23 10:33:11 rurban Exp $');
3 ?>
4 <head>
5 <?php if (strstr($request->get('HTTP_ACCEPT'),'application/xhtml+xml')) { ?>
6 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=<?=CHARSET?>" />
7 <?php } else { ?>
8 <meta http-equiv="Content-Type" content="text/html; charset=<?=CHARSET?>" />
9 <?php } ?>
10 <meta http-equiv="content-language" content="<?=$GLOBALS['LANG']?>" />
11 <?php $ROBOTS_CONTENT = $ROBOTS_META ? $ROBOTS_META : "noindex,nofollow"; ?>
12 <meta name="robots" content="<?= $ROBOTS_CONTENT ?>" />
13 <?php if (!empty($PAGE_DESCRIPTION)) { ?>
14 <meta name="description" content="<?=$PAGE_DESCRIPTION?>" />
15 <?php } ?>
16 <?php if (!empty($PAGE_KEYWORDS)) { ?>
17 <meta name="keywords" content="<?=$PAGE_KEYWORDS?>" />
18 <?php } ?>
19 <meta name="language" content="<?=$GLOBALS['LANG']?>" />
20 <meta name="document-type" content="Public" />
21 <meta name="document-rating" content="General" />
22 <meta name="generator" content="PhpWiki" />
23 <meta name="PHPWIKI_VERSION" content="<?=PHPWIKI_VERSION?>" />
24 <base href="<?=PHPWIKI_BASE_URL?>" />
25 <link rel="shortcut icon" href="<?=$WikiTheme->getImageURL('favicon.ico')?>" />
26 <?php /**
27        * Additional navigation links are provided here in the html header for browsers
28        * which support them: Mozilla, iCab, Amaya (and certain versions of Opera??).
29        *
30        * See http://www.w3.org/TR/html401/struct/links.html#edef-LINK
31        *     http://www.euronet.nl/~tekelenb/WWW/LINK/index.html
32        */ ?>
33 <?php /* The next few lines are wrapped in an odd manner to allow gettext string extraction: cd locale;make */ ?>
34 <link rel="home" title="<?=HOME_PAGE?>" href="<?=WikiURL(HOME_PAGE)?>" />
35 <link rel="help" title="<?=_("HowToUseWiki")?>" href="<?=WikiURL(
36 _("HowToUseWiki"))?>" />
37 <link rel="copyright" title="<?=COPYRIGHTPAGE_TITLE?>" href="<?=COPYRIGHTPAGE_URL?>" />
38 <link rel="author" title="<?=AUTHORPAGE_TITLE?>" href="<?=AUTHORPAGE_URL?>" />
39 <link rel="search" title="<?=_("FindPage")?>" href="<?=WikiURL(
40 _("FindPage"))?>" />
41 <?php /**
42        * Provide alternate variations of the page content:
43        * 'viewsource' and 'browse'.
44        * Translated pages could go here too.
45        */
46       if (!empty($revision)) {
47           $args = $request->getargs();
48           $action = $args['action'];
49           if (!($action == "viewsource")) {
50             $alternatelinkTitle = fmt("%s: %s", _("View Source"), $page->getName());
51             $alternatelinkUrl = WikiURL($revision, array('action' => 'viewsource'));
52           }
53           if (!($action == "browse")) {
54             $alternatelinkTitle = $page->getName();
55             $alternatelinkUrl = WikiURL($revision, array('action' => 'browse'));
56           } ?>
57 <link rel="alternate" title="<?= $alternatelinkTitle ?>" href="<?= $alternatelinkUrl ?>" />
58 <?php }
59       /**
60        * Link tag for RSS auto-discovery.  See
61        * http://diveintomark.org/archives/2002/05/30.html#rss_autodiscovery
62        * http://www.oreillynet.com/cs/weblog/view/wlg/1475
63        */
64 ?>
65 <link rel="alternate" type="application/rss+xml" title="RSS" href="<?=WikiURL(
66 _("RecentChanges"), array('format' => 'rss'))?>" />
67
68 <?php /**
69        * Add some user-specific links.
70        */ ?>
71 <?php if (!$user->isSignedIn()) {
72       /* For users not signed in */ ?>
73 <link rel="bookmark" title="<?=_("SandBox")?>" href="<?=WikiURL(
74 _("SandBox"))?>" />
75 <link rel="bookmark" title="<?=_("WikiWikiWeb")?>" href="<?=WikiURL(
76 _("WikiWikiWeb"))?>" />
77 <?php } ?>
78
79 <?php if ($user->isadmin()) {
80       /* Only for the Administrator */ ?>
81 <link rel="bookmark" title="<?=_("PhpWikiAdministration")?>" href="<?=WikiURL(
82 _("PhpWikiAdministration"))?>" />
83 <?php } ?>
84 <?php if ($user->isSignedIn()) {
85       /* For signed-in users */ ?>
86 <link rel="bookmark" title="<?=_("UserPreferences")?>" href="<?=WikiURL(
87 _("UserPreferences"))?>" />
88 <?php /* User's calendar page
89        */
90       $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR ._("Calendar");
91       $UserCalPageUrl = WikiURL($UserCalPageTitle);
92       ?>
93 <link rel="bookmark" title="<?= $UserCalPageTitle ?>" href="<?= $UserCalPageUrl ?>" />
94 <?php /* Today's calendar page for the user if it exists
95        */
96       $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time()); //FIXME
97       $dbi = $request->getDbh();
98       if ($dbi->isWikiPage($UserCalPageTodayTitle)) {
99           $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
100           ?>
101 <link rel="bookmark" title="<?= $UserCalPageTodayTitle ?>" href="<?= $UserCalPageTodayUrl ?>" />
102 <?php } ?>
103 <?php } //end of links for signed-in user ?>
104 <?= $WikiTheme->getCSS() ?><?php
105   // avoid redundant bookmark title for custom home page
106   if ($page->getName() == WIKI_NAME && HOME_PAGE == WIKI_NAME)
107       $pagetitle = "";
108   else
109       $pagetitle = " - ". AsString($TITLE);
110 ?>
111 <title><?= WIKI_NAME.$pagetitle ?></title>
112 <?= $WikiTheme->getMoreHeaders() ?>
113 </head>
114 <?php
115 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -                         
116 // $Log: not supported by cvs2svn $
117 // Revision 1.18  2004/06/14 11:26:52  rurban
118 // renamed global $Theme to $WikiTheme (gforge nameclash)
119 //
120 // Revision 1.17  2004/06/04 20:34:11  rurban
121 // Put several _("") into new lines if inside attr="", so that xgettext
122 // can pick it up. (Suggested by Pierrick Meignen)
123 //
124 // Revision 1.16  2004/06/03 16:56:22  rurban
125 // added Sidebar existing calendar dates
126 //
127 // Revision 1.15  2004/05/16 23:10:45  rurban
128 // update_locale wrongly resetted LANG, which broke japanese.
129 // japanese now correctly uses EUC_JP, not utf-8.
130 // more charset and lang headers to help the browser.
131 //
132 // Revision 1.14  2004/02/17 12:19:49  rurban
133 // support to add more javascript dynamically
134 //
135 // Revision 1.13  2003/12/05 15:36:39  carstenklapp
136 // Improvements: to make it easier to run multiple wikis off of one set
137 // of code, urls for link rel author and copyright now defined in
138 // index.php.
139 // Bugfix: updated language meta tag to use DEFAULT_LANGUAGE constant
140 // instead of old LANG global.
141 // Internal change: Eliminated RECENT_CHANGES constant from RSS link,
142 // just use the easily localizable _("RecentChanges").
143 // Typo fixed.
144 //
145 // Revision 1.12  2003/11/22 17:58:43  carstenklapp
146 // Minor internal change: Removed redundant call to gettext within
147 // fmt(). (locale make: head.tmpl:49: warning: keyword nested in keyword
148 // arg)
149 //
150 // Revision 1.11  2003/11/21 23:06:12  carstenklapp
151 // Bugfix: Some <link rel=...> links in Mozilla/iCab were always linking
152 // to the english pages even when DEFAULT_LANGUAGE != 'en'. (Rewrapped
153 // text for a more complete xgettext string extraction: 'cd
154 // phpwiki/locale;make' to update po/mo files).
155 //
156 // Revision 1.10  2003/03/07 20:51:59  dairiki
157 // New feature: Automatic extraction of keywords (for the meta keywords tag)
158 // from Category* and Topic* links on each page.
159 //
160 // Revision 1.9  2003/03/07 02:45:51  dairiki
161 // Rename BASE_URL to PHPWIKI_BASE_URL.  Lycos pre-defines BASE_URL (to
162 // the wrong thing).
163 //
164 // Revision 1.8  2003/03/05 21:38:15  dairiki
165 // More HTML comment reduction patches by "Klaus-Guenter Leiss"
166 // <Leiss.Klaus-Guenter@epost.de>
167 //
168 // (With a few adjustments by me.  Any bugs are probably my fault.)
169 //
170 // Revision 1.7  2003/02/26 22:27:17  dairiki
171 // Fix and refactor FrameInclude plugin (more or less).
172 //
173 // (This should now generate valid HTML.  Woohoo!)
174 //
175 // The output when using the Sidebar theme is ugly enough that it should
176 // be considered broken.  (But the Sidebar theme appears pretty broken in
177 // general right now.)
178 //
179 // (Personal comment (not to be taken personally): I must say that I
180 // remain unconvinced of the usefulness of this plugin.)
181 //
182 // Revision 1.6  2003/01/11 22:29:47  carstenklapp
183 // Tweak redundant bookmark title when browsing a custom home page with
184 // the same name as the wiki (i.e. avoid titles like "MyWiki - MyWiki"
185 // when HOME_PAGE==WIKI_NAME)
186 //
187 ?>