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