]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/head.tmpl
fix ROBOTS_META warning, break xgettext strings, add log as comment
[SourceForge/phpwiki.git] / themes / default / templates / head.tmpl
1 <?php  // -*-html-*-
2   rcs_id('$Id: head.tmpl,v 1.22 2005-01-25 07:15:47 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-language" content="<?=$GLOBALS['LANG']?>" />
11 <?php $ROBOTS_CONTENT = isset($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="<?=
36 _("HowToUseWiki")?>" href="<?=WikiURL(
37 _("HowToUseWiki"))?>" />
38 <link rel="copyright" title="<?=COPYRIGHTPAGE_TITLE?>" href="<?=COPYRIGHTPAGE_URL?>" />
39 <link rel="author" title="<?=AUTHORPAGE_TITLE?>" href="<?=AUTHORPAGE_URL?>" />
40 <link rel="search" title="<?=
41 _("FindPage")?>" href="<?=WikiURL(
42 _("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(
68 _("RecentChanges"), array('format' => 'rss'))?>" />
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="<?=
75 _("SandBox")?>" href="<?=WikiURL(
76 _("SandBox"))?>" />
77 <link rel="bookmark" title="<?=
78 _("WikiWikiWeb")?>" href="<?=WikiURL(
79 _("WikiWikiWeb"))?>" />
80 <?php } ?>
81
82 <?php if ($user->isAdmin()) {
83       /* Only for the Administrator */ ?>
84 <link rel="bookmark" title="<?=
85 _("PhpWikiAdministration")?>" href="<?=WikiURL(
86 _("PhpWikiAdministration"))?>" />
87 <?php } ?>
88 <?php if ($user->isSignedIn()) {
89       /* For signed-in users */ ?>
90 <link rel="bookmark" title="<?=
91 _("UserPreferences")?>" href="<?=WikiURL(
92 _("UserPreferences"))?>" />
93 <?php /* User's calendar page
94        */
95       $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR ._("Calendar");
96       $UserCalPageUrl = WikiURL($UserCalPageTitle);
97       ?>
98 <link rel="bookmark" title="<?= $UserCalPageTitle ?>" href="<?= $UserCalPageUrl ?>" />
99 <?php /* Today's calendar page for the user if it exists
100        */
101       $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time()); //FIXME
102       $dbi = $request->getDbh();
103       if ($dbi->isWikiPage($UserCalPageTodayTitle)) {
104           $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
105           ?>
106 <link rel="bookmark" title="<?= $UserCalPageTodayTitle ?>" href="<?= $UserCalPageTodayUrl ?>" />
107 <?php } ?>
108 <?php } //end of links for signed-in user ?>
109 <?= $WikiTheme->getCSS() ?><?php
110   // avoid redundant bookmark title for custom home page
111   if ($page->getName() == WIKI_NAME && HOME_PAGE == WIKI_NAME)
112       $pagetitle = "";
113   else
114       $pagetitle = " - ". AsString($TITLE);
115 ?>
116 <title><?= WIKI_NAME.$pagetitle ?></title>
117 <?= $WikiTheme->getMoreHeaders() ?>
118 </head>
119 <?php
120 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -                         
121 // $Log: not supported by cvs2svn $
122 // Revision 1.4  2004/06/18 08:40:39  rurban
123 // renamed global $Theme to $WikiTheme (gforge nameclash)
124 //
125 // Revision 1.3  2004/06/04 20:34:11  rurban
126 // Put several _("") into new lines if inside attr="", so that xgettext
127 // can pick it up. (Suggested by Pierrick Meignen)
128 //
129 // Revision 1.2  2004/06/03 12:30:38  rurban
130 // support edit_toolbar in other themes
131 //
132 // Revision 1.1  2004/05/12 19:42:16  rurban
133 // new Crao theme by Arnaud Fontaine and Laurent Lunati
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 ?>