]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/head.tmpl
added Sidebar existing calendar dates
[SourceForge/phpwiki.git] / themes / default / templates / head.tmpl
1 <?php  // -*-html-*-
2   rcs_id('$Id: head.tmpl,v 1.16 2004-06-03 16:56:22 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="<?=$Theme->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(_("RecentChanges"), array('format' => 'rss'))?>" />
62
63 <?php /**
64        * Add some user-specific links.
65        */ ?>
66 <?php if (!$user->isSignedIn()) {
67       /* For users not signed in */ ?>
68 <link rel="bookmark" title="<?=_("SandBox")?>" href="<?=WikiURL(
69 _("SandBox"))?>" />
70 <link rel="bookmark" title="<?=_("WikiWikiWeb")?>" href="<?=WikiURL(
71 _("WikiWikiWeb"))?>" />
72 <?php } ?>
73
74 <?php if ($user->isadmin()) {
75       /* Only for the Administrator */ ?>
76 <link rel="bookmark" title="<?=_("PhpWikiAdministration")?>" href="<?=WikiURL(
77 _("PhpWikiAdministration"))?>" />
78 <?php } ?>
79 <?php if ($user->isSignedIn()) {
80       /* For signed-in users */ ?>
81 <link rel="bookmark" title="<?=_("UserPreferences")?>" href="<?=WikiURL(
82 _("UserPreferences"))?>" />
83 <?php /* User's calendar page
84        */
85       $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR ._("Calendar");
86       $UserCalPageUrl = WikiURL($UserCalPageTitle);
87       ?>
88 <link rel="bookmark" title="<?= $UserCalPageTitle ?>" href="<?= $UserCalPageUrl ?>" />
89 <?php /* Today's calendar page for the user if it exists
90        */
91       $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time()); //FIXME
92       $dbi = $request->getDbh();
93       if ($dbi->isWikiPage($UserCalPageTodayTitle)) {
94           $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
95           ?>
96 <link rel="bookmark" title="<?= $UserCalPageTodayTitle ?>" href="<?= $UserCalPageTodayUrl ?>" />
97 <?php } ?>
98 <?php } //end of links for signed-in user ?>
99 <?= $Theme->getCSS() ?><?php
100   // avoid redundant bookmark title for custom home page
101   if ($page->getName() == WIKI_NAME && HOME_PAGE == WIKI_NAME)
102       $pagetitle = "";
103   else
104       $pagetitle = " - ". AsString($TITLE);
105 ?>
106 <title><?= WIKI_NAME.$pagetitle ?></title>
107 <?= $Theme->getMoreHeaders() ?>
108 </head>
109 <?php
110 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -                         
111 // $Log: not supported by cvs2svn $
112 // Revision 1.15  2004/05/16 23:10:45  rurban
113 // update_locale wrongly resetted LANG, which broke japanese.
114 // japanese now correctly uses EUC_JP, not utf-8.
115 // more charset and lang headers to help the browser.
116 //
117 // Revision 1.14  2004/02/17 12:19:49  rurban
118 // support to add more javascript dynamically
119 //
120 // Revision 1.13  2003/12/05 15:36:39  carstenklapp
121 // Improvements: to make it easier to run multiple wikis off of one set
122 // of code, urls for link rel author and copyright now defined in
123 // index.php.
124 // Bugfix: updated language meta tag to use DEFAULT_LANGUAGE constant
125 // instead of old LANG global.
126 // Internal change: Eliminated RECENT_CHANGES constant from RSS link,
127 // just use the easily localizable _("RecentChanges").
128 // Typo fixed.
129 //
130 // Revision 1.12  2003/11/22 17:58:43  carstenklapp
131 // Minor internal change: Removed redundant call to gettext within
132 // fmt(). (locale make: head.tmpl:49: warning: keyword nested in keyword
133 // arg)
134 //
135 // Revision 1.11  2003/11/21 23:06:12  carstenklapp
136 // Bugfix: Some <link rel=...> links in Mozilla/iCab were always linking
137 // to the english pages even when DEFAULT_LANGUAGE != 'en'. (Rewrapped
138 // text for a more complete xgettext string extraction: 'cd
139 // phpwiki/locale;make' to update po/mo files).
140 //
141 // Revision 1.10  2003/03/07 20:51:59  dairiki
142 // New feature: Automatic extraction of keywords (for the meta keywords tag)
143 // from Category* and Topic* links on each page.
144 //
145 // Revision 1.9  2003/03/07 02:45:51  dairiki
146 // Rename BASE_URL to PHPWIKI_BASE_URL.  Lycos pre-defines BASE_URL (to
147 // the wrong thing).
148 //
149 // Revision 1.8  2003/03/05 21:38:15  dairiki
150 // More HTML comment reduction patches by "Klaus-Guenter Leiss"
151 // <Leiss.Klaus-Guenter@epost.de>
152 //
153 // (With a few adjustments by me.  Any bugs are probably my fault.)
154 //
155 // Revision 1.7  2003/02/26 22:27:17  dairiki
156 // Fix and refactor FrameInclude plugin (more or less).
157 //
158 // (This should now generate valid HTML.  Woohoo!)
159 //
160 // The output when using the Sidebar theme is ugly enough that it should
161 // be considered broken.  (But the Sidebar theme appears pretty broken in
162 // general right now.)
163 //
164 // (Personal comment (not to be taken personally): I must say that I
165 // remain unconvinced of the usefulness of this plugin.)
166 //
167 // Revision 1.6  2003/01/11 22:29:47  carstenklapp
168 // Tweak redundant bookmark title when browsing a custom home page with
169 // the same name as the wiki (i.e. avoid titles like "MyWiki - MyWiki"
170 // when HOME_PAGE==WIKI_NAME)
171 //
172 ?>