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