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