/
tpl_header.php
124 lines (109 loc) · 3.84 KB
/
tpl_header.php
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
<?php
/**
* Template header, included in the main and detail files
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC'))
die();
$isLoggedIn = !empty($_SERVER['REMOTE_USER']);
?>
<!-- ********** HEADER ********** -->
<div id="dokuwiki__header"><div class="pad group">
<?php tpl_includeFile('header.html') ?>
<div class="headings group">
<ul class="a11y skip">
<li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content']; ?></a></li>
</ul>
<?php if (tpl_getConf('tpl_mtb_schotland_2016:showLogoInHeader')): ?>
<h1><?php
// get logo either out of the template images folder or data/media folder
$logoSize = array();
$logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize);
// display logo and wiki title in a link to the home page
// @tpl_mtb_schotland_2016-template@ : Title is optional in this template
if (tpl_getConf("tpl_mtb_schotland_2016:showTitleInHeader"))
tpl_link(
wl(), '<img src="' . $logo . '" ' . $logoSize[3] . ' alt="" /> <span>' . $conf['title'] . '</span>', 'accesskey="h" title="[H]"'
);
else
tpl_link(
wl(), '<img src="' . $logo . '" ' . $logoSize[3] . ' alt="" />', 'accesskey="h" title="[H]"'
);
?></h1>
<?php endif ?>
<?php if ($conf['tagline']): ?>
<p class="claim"><?php echo $conf['tagline']; ?></p>
<?php endif ?>
</div>
<div class="tools group">
<!-- USER TOOLS -->
<?php if ($conf['useacl']): ?>
<div id="dokuwiki__usertools">
<h3 class="a11y"><?php echo $lang['user_tools']; ?></h3>
<ul>
<?php
if ($isLoggedIn) {
echo '<li class="user">';
tpl_userinfo(); /* 'Logged in as ...' */
echo '</li>';
}
tpl_action('admin', 1, 'li');
tpl_action('profile', 1, 'li');
tpl_action('register', 1, 'li');
tpl_action('login', 1, 'li');
?>
</ul>
</div>
<?php endif ?>
<!-- SITE TOOLS -->
<div id="dokuwiki__sitetools">
<h3 class="a11y"><?php echo $lang['site_tools']; ?></h3>
<?php
if (tpl_getConf('tpl_mtb_schotland_2016:showSearchBox'))
tpl_searchform();
?>
<div class="mobileTools">
<?php tpl_actiondropdown($lang['tools']); ?>
</div>
<!-- TRANSLATION PLUGIN - @tpl_mtb_schotland_2016-template@ -->
<?php
if (tpl_getConf('tpl_mtb_schotland_2016:showTranslation')) {
$translation = &plugin_load('helper', 'translation');
if ($translation)
echo $translation->showTranslations();
}
?>
<ul>
<?php
if ($isLoggedIn) {
tpl_action('recent', 1, 'li');
tpl_action('media', 1, 'li');
}
tpl_action('index', 1, 'li');
?>
</ul>
</div>
</div>
<!-- TOPBAR - @tpl_mtb_schotland_2016-template@ -->
<div class="topbar">
<?php
if (tpl_getConf("tpl_mtb_schotland_2016:htmltopbar"))
tpl_includeFile('topbar.php');
else
tpl_include_page(tpl_getConf("tpl_mtb_schotland_2016:pagetopbar"), 1, 1);
?>
</div>
<!-- BREADCRUMBS -->
<?php if ($conf['breadcrumbs'] || $conf['youarehere']): ?>
<div class="breadcrumbs">
<?php if ($conf['youarehere']): ?>
<div class="youarehere"><?php tpl_youarehere() ?></div>
<?php endif ?>
<?php if ($conf['breadcrumbs']): ?>
<div class="trace"><?php tpl_breadcrumbs() ?></div>
<?php endif ?>
</div>
<?php endif ?>
<?php html_msgarea() ?>
<hr class="a11y" />
</div></div><!-- /header -->