-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
139 lines (124 loc) · 4.41 KB
/
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?php
$t = plugin_load( 'action', 'templatefnordhelper_templateaction' );
if( !function_exists( 'tpl_youarehere_lv' )) {
// you are here less verbose
function tpl_youarehere_lv($sep=' » '){/*{{{*/
global $conf;
global $ID;
global $lang;
// check if enabled
#if(!$conf['youarehere']) return false;
$parts = explode(':', $ID);
$count = count($parts);
#echo '<span class="bchead">'.$lang['youarehere'].'</span> ';
echo '<span class="bchead"> </span> ';
if( $count > 1 ) {
// always print the startpage
$title = useHeading('navigation') ? p_get_first_heading($conf['start']) : $conf['start'];
if(!$title) $title = $conf['start'];
#tpl_link(wl($conf['start']),hsc($title),'title="'.$conf['start'].'"');
// print intermediate namespace links
$part = '';
for($i=0; $i<$count - 1; $i++){
$part .= $parts[$i].':';
$page = $part;
resolve_pageid('',$page,$exists);
if ($page == $conf['start']) continue; // Skip startpage
// output
echo "<div><nobr>";
echo $sep;
if($exists){
#$title = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i];
$title = $parts[$i];
tpl_link(wl($page),hsc($title),'title="'.$page.'"');
}else{
tpl_link(wl($page),$parts[$i],'title="'.$page.'" class="wikilink2" rel="nofollow"');
}
echo "</nobr></div>";
}
// print current page, skipping start page, skipping for namespace index
if(isset($page) && $page==$part.$parts[$i]) return;
$page = $part.$parts[$i];
if($page == $conf['start']) return;
echo "<div class='active'><nobr>";
echo $sep;
if(page_exists($page)){
#$title = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i];
$title = $parts[$i];
tpl_link(wl($page),hsc($title),'title="'.$page.'"');
}else{
tpl_link(wl($page),$parts[$i],'title="'.$page.'" class="wikilink2" rel="nofollow"');
}
echo "</nobr></div>";
}
return true;
}/*}}}*/
}
if( !function_exists( 'tpl_sidebar_lv' )) {
// you are here less verbose
function tpl_sidebar_lv( ){/*{{{*/
echo '';
}/*}}}*/
}
if( !function_exists( 'tpl_topbar_lv' )) {
// you are here less verbose
function tpl_topbar_lv( ){/*{{{*/
echo '';
}/*}}}*/
}
if( !function_exists( 'tpl_footer_lv' )) {
// you are here less verbose
function tpl_footer_lv( ){/*{{{*/
echo '<div class="actions">';
tpl_button('edit');
tpl_button('history');
#tpl_button('media');
tpl_button('backlink');
tpl_button('recent');
tpl_button('index');
echo '</div>';
}/*}}}*/
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>" lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction']?>">
<head>
<?php tpl_metaheaders();?>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="content-language" content="en"/>
<title><?php tpl_pagetitle();?> [<?php echo hsc($conf['title']);?>]</title>
</head>
<body class='<?php #echo $t->get_user( 'theme' ) ?>'>
<?php html_msgarea();?>
<div class="dokuwiki">
<div class="header">
<div>
<div class="user">
<?php tpl_userinfo();?>
<?php tpl_actionlink('subscription');?>
<?php tpl_actionlink('profile');?>
<?php tpl_actionlink('admin');?>
<?php tpl_actionlink('login');?>
</div>
<div class='hlogo-wrapper'>
<a href='/'><nobr>
<div class='hlogo-l'> </div>
<div class='hlogo <?php $r = floor( substr( time() * 5 , -2 ) / 5 ); echo 'hlogo-rand-'.$r ?>'> </div>
<div class='hlogo-r'> </div>
</nobr></a>
<p class='r'><?php echo $r." - ".time( )?></p>
</div>
</div>
<div class="search"><?php tpl_searchform();?></div>
<!--
<div class='theme-switch'>
<?
$prefix = $_SERVER['REQUEST_URI'].( strpos( $_SERVER['REQUEST_URI'], '?' ) !== false ? '&' : '?' );
$themes = array( 'ccc-white', 'black-yellow', 'green-black', 'green-white' );
foreach( $themes as $th ) { echo "<a class='$th' href='".$prefix."utpl_theme=$th'>$th</a>"; }
?>
</div>
-->
<div class="title"><?php tpl_topbar_lv( );?></div>
</div>
<div class="wrapper">