File: head.tmpl

package info (click to toggle)
phpwiki 1.3.14-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 15,716 kB
  • ctags: 23,548
  • sloc: php: 88,295; sql: 1,476; sh: 1,378; perl: 765; makefile: 602; awk: 28
file content (194 lines) | stat: -rwxr-xr-x 7,994 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?php  // -*-html-*-
  rcs_id('$Id: head.tmpl,v 1.23 2005/10/10 20:02:54 rurban Exp $');
?>
<head>
<?php if (ENABLE_XHTML_XML and strstr($request->get('HTTP_ACCEPT'),'application/xhtml+xml')) { ?>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=<?=$charset?>" />
<?php } else { ?>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>" />
<?php } ?>
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="<?=$GLOBALS['LANG']?>" />
<?php $ROBOTS_CONTENT = isset($ROBOTS_META) ? $ROBOTS_META : "noindex,nofollow"; ?>
<meta name="robots" content="<?= $ROBOTS_CONTENT ?>" />
<?php if (!empty($PAGE_DESCRIPTION)) { ?>
<meta name="description" content="<?=$PAGE_DESCRIPTION?>" />
<?php } ?>
<?php if (!empty($PAGE_KEYWORDS)) { ?>
<meta name="keywords" content="<?=$PAGE_KEYWORDS?>" />
<?php } ?>
<meta name="language" content="<?=$GLOBALS['LANG']?>" />
<meta name="document-type" content="Public" />
<meta name="document-rating" content="General" />
<meta name="generator" content="PhpWiki" />
<meta name="PHPWIKI_VERSION" content="<?=PHPWIKI_VERSION?>" />
<base href="<?=PHPWIKI_BASE_URL?>" />
<link rel="shortcut icon" href="<?=$WikiTheme->getImageURL('favicon.ico')?>" />
<?php /**
       * Additional navigation links are provided here in the html header for browsers
       * which support them: Mozilla, iCab, Amaya (and certain versions of Opera??).
       *
       * See http://www.w3.org/TR/html401/struct/links.html#edef-LINK
       *     http://www.euronet.nl/~tekelenb/WWW/LINK/index.html
       */ ?>
<?php /* The next few lines are wrapped in an odd manner to allow gettext string extraction: cd locale;make */ ?>
<link rel="home" title="<?=HOME_PAGE?>" href="<?=WikiURL(HOME_PAGE)?>" />
<link rel="help" title="<?=
_("HowToUseWiki")?>" href="<?=WikiURL(
_("HowToUseWiki"))?>" />
<link rel="copyright" title="<?=COPYRIGHTPAGE_TITLE?>" href="<?=COPYRIGHTPAGE_URL?>" />
<link rel="author" title="<?=AUTHORPAGE_TITLE?>" href="<?=AUTHORPAGE_URL?>" />
<link rel="search" title="<?=
_("FindPage")?>" href="<?=WikiURL(
_("FindPage"))?>" />
<?php /**
       * Provide alternate variations of the page content:
       * 'viewsource' and 'browse'.
       * Translated pages could go here too.
       */
      if (!empty($revision)) {
          $args = $request->getargs();
          $action = $args['action'];
          if (!($action == "viewsource")) {
            $alternatelinkTitle = fmt("%s: %s", _("View Source"), $page->getName());
            $alternatelinkUrl = WikiURL($revision, array('action' => 'viewsource'));
          }
          if (!($action == "browse")) {
            $alternatelinkTitle = $page->getName();
            $alternatelinkUrl = WikiURL($revision, array('action' => 'browse'));
          } ?>
<link rel="alternate" title="<?= $alternatelinkTitle ?>" href="<?= $alternatelinkUrl ?>" />
<?php }
      /**
       * Link tag for RSS auto-discovery.  See
       * http://diveintomark.org/archives/2002/05/30.html#rss_autodiscovery
       * http://www.oreillynet.com/cs/weblog/view/wlg/1475
       */
?>
<link rel="alternate" type="application/rss+xml" title="RSS" href="<?=WikiURL(
_("RecentChanges"), array('format' => 'rss'))?>" />
<?php /**
       * Add some user-specific links.
       */ ?>
<?php if (!$user->isSignedIn()) {
      /* For users not signed in */ ?>
<link rel="bookmark" title="<?=
_("SandBox")?>" href="<?=WikiURL(
_("SandBox"))?>" />
<link rel="bookmark" title="<?=
_("WikiWikiWeb")?>" href="<?=WikiURL(
_("WikiWikiWeb"))?>" />
<?php } ?>

<?php if ($user->isAdmin()) {
      /* Only for the Administrator */ ?>
<link rel="bookmark" title="<?=
_("PhpWikiAdministration")?>" href="<?=WikiURL(
_("PhpWikiAdministration"))?>" />
<?php } ?>
<?php if ($user->isSignedIn()) {
      /* For signed-in users */ ?>
<link rel="bookmark" title="<?=
_("UserPreferences")?>" href="<?=WikiURL(
_("UserPreferences"))?>" />
<?php /* User's calendar page
       */
      $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR ._("Calendar");
      $UserCalPageUrl = WikiURL($UserCalPageTitle);
      ?>
<link rel="bookmark" title="<?= $UserCalPageTitle ?>" href="<?= $UserCalPageUrl ?>" />
<?php /* Today's calendar page for the user if it exists
       */
      $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time()); //FIXME
      $dbi = $request->getDbh();
      if ($dbi->isWikiPage($UserCalPageTodayTitle)) {
          $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
          ?>
<link rel="bookmark" title="<?= $UserCalPageTodayTitle ?>" href="<?= $UserCalPageTodayUrl ?>" />
<?php } ?>
<?php } //end of links for signed-in user ?>
<?= $WikiTheme->getCSS() ?><?php
  // avoid redundant bookmark title for custom home page
  if ($page->getName() == WIKI_NAME && HOME_PAGE == WIKI_NAME)
      $pagetitle = "";
  else
      $pagetitle = " - ". AsString($TITLE);
?>
<title><?= WIKI_NAME.$pagetitle ?></title>
<?= $WikiTheme->getMoreHeaders() ?>
</head>
<?php
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -                         
// $Log: head.tmpl,v $
// Revision 1.23  2005/10/10 20:02:54  rurban
// add one more header
//
// Revision 1.22  2005/01/25 07:15:47  rurban
// fix ROBOTS_META warning, break xgettext strings, add log as comment
//
// Revision 1.4  2004/06/18 08:40:39  rurban
// renamed global $Theme to $WikiTheme (gforge nameclash)
//
// Revision 1.3  2004/06/04 20:34:11  rurban
// Put several _("") into new lines if inside attr="", so that xgettext
// can pick it up. (Suggested by Pierrick Meignen)
//
// Revision 1.2  2004/06/03 12:30:38  rurban
// support edit_toolbar in other themes
//
// Revision 1.1  2004/05/12 19:42:16  rurban
// new Crao theme by Arnaud Fontaine and Laurent Lunati
//
// Revision 1.13  2003/12/05 15:36:39  carstenklapp
// Improvements: to make it easier to run multiple wikis off of one set
// of code, urls for link rel author and copyright now defined in
// index.php.
// Bugfix: updated language meta tag to use DEFAULT_LANGUAGE constant
// instead of old LANG global.
// Internal change: Eliminated RECENT_CHANGES constant from RSS link,
// just use the easily localizable _("RecentChanges").
// Typo fixed.
//
// Revision 1.12  2003/11/22 17:58:43  carstenklapp
// Minor internal change: Removed redundant call to gettext within
// fmt(). (locale make: head.tmpl:49: warning: keyword nested in keyword
// arg)
//
// Revision 1.11  2003/11/21 23:06:12  carstenklapp
// Bugfix: Some <link rel=...> links in Mozilla/iCab were always linking
// to the english pages even when DEFAULT_LANGUAGE != 'en'. (Rewrapped
// text for a more complete xgettext string extraction: 'cd
// phpwiki/locale;make' to update po/mo files).
//
// Revision 1.10  2003/03/07 20:51:59  dairiki
// New feature: Automatic extraction of keywords (for the meta keywords tag)
// from Category* and Topic* links on each page.
//
// Revision 1.9  2003/03/07 02:45:51  dairiki
// Rename BASE_URL to PHPWIKI_BASE_URL.  Lycos pre-defines BASE_URL (to
// the wrong thing).
//
// Revision 1.8  2003/03/05 21:38:15  dairiki
// More HTML comment reduction patches by "Klaus-Guenter Leiss"
// <Leiss.Klaus-Guenter@epost.de>
//
// (With a few adjustments by me.  Any bugs are probably my fault.)
//
// Revision 1.7  2003/02/26 22:27:17  dairiki
// Fix and refactor FrameInclude plugin (more or less).
//
// (This should now generate valid HTML.  Woohoo!)
//
// The output when using the Sidebar theme is ugly enough that it should
// be considered broken.  (But the Sidebar theme appears pretty broken in
// general right now.)
//
// (Personal comment (not to be taken personally): I must say that I
// remain unconvinced of the usefulness of this plugin.)
//
// Revision 1.6  2003/01/11 22:29:47  carstenklapp
// Tweak redundant bookmark title when browsing a custom home page with
// the same name as the wiki (i.e. avoid titles like "MyWiki - MyWiki"
// when HOME_PAGE==WIKI_NAME)
//
?>