]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/head.tmpl
New feature: Automatic extraction of keywords (for the meta keywords tag)
[SourceForge/phpwiki.git] / themes / default / templates / head.tmpl
1 <?php  // -*-html-*-
2   rcs_id('$Id: head.tmpl,v 1.10 2003-03-07 20:51:59 dairiki Exp $');
3 ?>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=<?=CHARSET?>" />
6 <?php $ROBOTS_CONTENT = $ROBOTS_META ? $ROBOTS_META : "noindex,nofollow"; ?>
7 <meta name="robots" content="<?= $ROBOTS_CONTENT ?>" />
8 <?php if (!empty($PAGE_DESCRIPTION)) { ?>
9 <meta name="description" content="<?=$PAGE_DESCRIPTION?>" />
10 <?php } ?>
11 <?php if (!empty($PAGE_KEYWORDS)) { ?>
12 <meta name="keywords" content="<?=$PAGE_KEYWORDS?>" />
13 <?php } ?>
14 <meta name="language" content="<?=$LANG?>" />
15 <meta name="document-type" content="Public" />
16 <meta name="document-rating" content="General" />
17 <meta name="generator" content="phpWiki" />
18 <meta name="PHPWIKI_VERSION" content="<?=PHPWIKI_VERSION?>" />
19 <base href="<?=PHPWIKI_BASE_URL?>" />
20 <link rel="shortcut icon" href="<?=$Theme->getImageURL('favicon.ico')?>" />
21 <?php /**
22        * Additional navigation links are provided here in the html header for browsers
23        * which support them: Mozilla, iCab, Amaya (and certain versions of Opera??).
24        *
25        * See http://www.w3.org/TR/html401/struct/links.html#edef-LINK
26        *     http://www.euronet.nl/~tekelenb/WWW/LINK/index.html
27        */ ?>
28 <link rel="home" title="<?=HOME_PAGE?>" href="<?=WikiURL(HOME_PAGE)?>" />
29 <link rel="help" title="<?=_("HowToUseWiki")?>" href="<?=WikiURL(_("HowToUseWiki"))?>" />
30 <link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" />
31 <?php
32       $wikiadminName = _("The PhpWiki Programming Team");
33       $wikiadminUrl = "http://phpwiki.sourceforge.net/phpwiki/ThePhpWikiProgrammingTeam";
34       ?>
35 <link rel="author" title="<?= $wikiadminName ?>" href="<?= $wikiadminUrl ?>" />
36 <link rel="search" title="<?=_("FindPage")?>" href="<?=WikiURL(_("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(RECENT_CHANGES, 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(_("SandBox"))?>" />
69 <link rel="bookmark" title="<?=_("WikiWikiWeb")?>" href="<?=WikiURL(_("WikiWikiWeb"))?>" />
70 <?php } ?>
71
72 <?php if ($user->isadmin()) {
73       /* Only for the Administrator */ ?>
74 <link rel="bookmark" title="<?=_("PhpWikiAdministration")?>" href="<?=WikiURL(_("PhpWikiAdministration"))?>" />
75 <?php } ?>
76
77 <?php if ($user->isSignedIn()) {
78       /* For signed-in users */ ?>
79 <link rel="bookmark" title="<?=_("UserPreferences")?>" href="<?=WikiURL(_("UserPreferences"))?>" />
80 <?php /* User's calendar page
81        */
82       $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR ._("Calendar");
83       $UserCalPageUrl = WikiURL($UserCalPageTitle);
84       ?>
85 <link rel="bookmark" title="<?= $UserCalPageTitle ?>" href="<?= $UserCalPageUrl ?>" />
86 <?php /* Today's calendar page for the user if it exists
87        */
88       $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time()); //FIXME
89       $dbi = $request->getDbh();
90       if ($dbi->isWikiPage($UserCalPageTodayTitle)) {
91           $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
92           ?>
93 <link rel="bookmark" title="<?= $UserCalPageTodayTitle ?>" href="<?= $UserCalPageTodayUrl ?>" />
94 <?php } ?>
95 <?php } //end of links for signed-in user ?>
96
97 <?= $Theme->getCSS() ?>
98 <?php
99   // avoid redundant bookmark title for custom home page
100   if ($page->getName() == WIKI_NAME && HOME_PAGE == WIKI_NAME)
101       $pagetitle = "";
102   else
103       $pagetitle = " - ". AsString($TITLE);
104 ?>
105 <title><?=WIKI_NAME.$pagetitle?></title>
106 </head>
107
108 <?php
109 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -                         
110 // $Log: not supported by cvs2svn $
111 // Revision 1.9  2003/03/07 02:45:51  dairiki
112 // Rename BASE_URL to PHPWIKI_BASE_URL.  Lycos pre-defines BASE_URL (to
113 // the wrong thing).
114 //
115 // Revision 1.8  2003/03/05 21:38:15  dairiki
116 // More HTML comment reduction patches by "Klaus-Guenter Leiss"
117 // <Leiss.Klaus-Guenter@epost.de>
118 //
119 // (With a few adjustments by me.  Any bugs are probably my fault.)
120 //
121 // Revision 1.7  2003/02/26 22:27:17  dairiki
122 // Fix and refactor FrameInclude plugin (more or less).
123 //
124 // (This should now generate valid HTML.  Woohoo!)
125 //
126 // The output when using the Sidebar theme is ugly enough that it should
127 // be considered broken.  (But the Sidebar theme appears pretty broken in
128 // general right now.)
129 //
130 // (Personal comment (not to be taken personally): I must say that I
131 // remain unconvinced of the usefulness of this plugin.)
132 //
133 // Revision 1.6  2003/01/11 22:29:47  carstenklapp
134 // Tweak redundant bookmark title when browsing a custom home page with
135 // the same name as the wiki (i.e. avoid titles like "MyWiki - MyWiki"
136 // when HOME_PAGE==WIKI_NAME)
137 //
138 ?>