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