]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/head.tmpl
Patch 3022476 by Sébastien Le Callonnec: Broken HTML when uploading pages
[SourceForge/phpwiki.git] / themes / default / templates / head.tmpl
1 <?php  // -*-php-*-
2 // rcs_id('$Id$');
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=<?php echo $charset?>" />
7 <?php } else { ?>
8 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset?>" />
9 <?php } ?>
10 <meta http-equiv="Content-Style-Type" content="text/css" />
11 <meta http-equiv="Content-Language" content="<?php echo $GLOBALS['LANG']?>" />
12 <?php $ROBOTS_CONTENT = isset($ROBOTS_META) ? $ROBOTS_META : "noindex,nofollow"; ?>
13 <meta name="robots" content="<?php echo $ROBOTS_CONTENT ?>" />
14 <?php if (!empty($PAGE_DESCRIPTION)) { ?>
15 <meta name="description" content="<?php echo $PAGE_DESCRIPTION?>" />
16 <?php } ?>
17 <?php if (!empty($PAGE_KEYWORDS)) { ?>
18 <meta name="keywords" content="<?php echo $PAGE_KEYWORDS?>" />
19 <?php } ?>
20 <meta name="language" content="<?php echo $GLOBALS['LANG']?>" />
21 <meta name="document-type" content="Public" />
22 <meta name="document-rating" content="General" />
23 <meta name="generator" content="PhpWiki" />
24 <meta name="PHPWIKI_VERSION" content="<?php echo PHPWIKI_VERSION?>" />
25 <base href="<?php echo PHPWIKI_BASE_URL?>" />
26 <link rel="shortcut icon" href="<?php echo $WikiTheme->getImageURL('favicon.ico')?>" />
27 <?php /**
28        * Additional navigation links are provided here in the html header for browsers
29        * which support them: Mozilla, iCab, Amaya (and certain versions of Opera??).
30        *
31        * See http://www.w3.org/TR/html401/struct/links.html#edef-LINK
32        *     http://www.euronet.nl/~tekelenb/WWW/LINK/index.html
33        */ ?>
34 <?php /* The next few lines are wrapped in an odd manner to allow gettext string extraction: cd locale;make */ ?>
35 <link rel="home" title="<?php echo HOME_PAGE?>" href="<?php echo WikiURL(HOME_PAGE)?>" />
36 <link rel="help" title="<?php echo 
37 _("HowToUseWiki")?>" href="<?php echo WikiURL(
38 _("HowToUseWiki"))?>" />
39 <link rel="copyright" title="<?php echo COPYRIGHTPAGE_TITLE?>" href="<?php echo COPYRIGHTPAGE_URL?>" />
40 <link rel="author" title="<?php echo AUTHORPAGE_TITLE?>" href="<?php echo AUTHORPAGE_URL?>" />
41 <link rel="search" title="<?php echo 
42 _("FindPage")?>" href="<?php echo WikiURL(
43 _("FindPage"))?>" />
44 <?php /**
45        * Provide alternate variations of the page content:
46        * 'viewsource' and 'browse'.
47        * Translated pages could go here too.
48        */
49       if (!empty($revision)) {
50           $args = $request->getArgs();
51           $action = empty($args['action']) ? 'browse' : $args['action'];
52           if (!($action == "viewsource")) {
53             $alternatelinkTitle = fmt("%s: %s", _("View Source"), $page->getName());
54             $alternatelinkUrl = WikiURL($revision, array('action' => 'viewsource'));
55           }
56           if (!($action == "browse")) {
57             $alternatelinkTitle = $page->getName();
58             $alternatelinkUrl = WikiURL($revision, array('action' => 'browse'));
59           } ?>
60 <link rel="alternate" title="<?php echo $alternatelinkTitle ?>" href="<?php echo $alternatelinkUrl ?>" />
61 <?php }
62       /**
63        * Link tag for RSS auto-discovery.  See
64        * http://diveintomark.org/archives/2002/05/30.html#rss_autodiscovery
65        * http://www.oreillynet.com/cs/weblog/view/wlg/1475
66        */
67 ?>
68 <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo WikiURL(
69 _("RecentChanges"), array('format' => 'rss'))?>" />
70 <link rel="alternate" type="application/atom+xml" title="ATOM" href="<?php echo WikiURL(
71 _("RecentChanges"), array('format' => 'atom'))?>" />
72 <?php /**
73        * Add some user-specific links.
74        */ ?>
75 <?php if (!$user->isSignedIn()) {
76       /* For users not signed in */ ?>
77 <link rel="bookmark" title="<?php echo 
78 _("SandBox")?>" href="<?php echo WikiURL(
79 _("SandBox"))?>" />
80 <link rel="bookmark" title="<?php echo 
81 _("WikiWikiWeb")?>" href="<?php echo WikiURL(
82 _("WikiWikiWeb"))?>" />
83 <?php } ?>
84 <link rel="alternate" type="application/x-wiki" title="Edit this page!" href="<?php echo WikiURL($page,array('action'=>'edit')) ?>" />
85 <?php if ($user->isAdmin()) {
86       /* Only for the Administrator */ ?>
87 <link rel="bookmark" title="<?php echo 
88 _("PhpWikiAdministration")?>" href="<?php echo WikiURL(
89 _("PhpWikiAdministration"))?>" />
90 <?php } ?>
91 <?php if ($user->isSignedIn()) {
92       /* For signed-in users */ ?>
93 <link rel="bookmark" title="<?php echo 
94 _("UserPreferences")?>" href="<?php echo WikiURL(
95 _("UserPreferences"))?>" />
96 <?php /* User's calendar page
97        */
98       $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR ._("Calendar");
99       $UserCalPageUrl = WikiURL($UserCalPageTitle);
100       ?>
101 <link rel="bookmark" title="<?php echo $UserCalPageTitle ?>" href="<?php echo $UserCalPageUrl ?>" />
102 <?php /* Today's calendar page for the user if it exists
103        */
104       $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time()); //FIXME
105       $dbi = $request->getDbh();
106       if ($dbi->isWikiPage($UserCalPageTodayTitle)) {
107           $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
108           ?>
109 <link rel="bookmark" title="<?php echo $UserCalPageTodayTitle ?>" href="<?php echo $UserCalPageTodayUrl ?>" />
110 <?php } ?>
111 <?php } //end of links for signed-in user ?>
112 <?php echo $WikiTheme->getCSS() ?><?php
113   // avoid redundant bookmark title for custom home page
114   if ($page->getName() == WIKI_NAME && HOME_PAGE == WIKI_NAME)
115       $pagetitle = "";
116   else
117       $pagetitle = " - ". AsString($TITLE);
118 ?>
119 <title><?php echo WIKI_NAME.$pagetitle ?></title>
120 <meta property="og:title" content="<?php echo strip_tags($TITLE) ?>"/>
121 <meta property="og:site_name" content="<?php echo WIKI_NAME ?>"/>
122 <?php echo $WikiTheme->getMoreHeaders() ?>
123 </head>