-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsidebar.php
67 lines (58 loc) · 2.54 KB
/
sidebar.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
<?php
/*
*
* Edit this file to create your own sidebar.
* This allows you to fully customize it,
* for example you can choose any of icon available at https://material.io/icons/
*
*/
/*
* Choose if you want to render the sidebar DokuWiki page
*/
$sidebarPage = tpl_getConf('dokuwikiSidebar') == 1 ? true : false;
/*
* Choose if you want to have a feedback form and if it should include technical information.
*/
$feedbackForm = tpl_getConf('feedbackForm') == 1 ? true : false;
$technical = tpl_getConf('technicalFeedbackForm') == 1 ? true : false;
/*
* You can customize the feedback form below.
*/
$email = tpl_getConf('feedbackEmail');
$subjectLine = tpl_getConf('feedbackSubjectLine');
$body = tpl_getConf('feedbackBody');
$feedbackLink = "mailto:".$email."?subject=".rawurlencode($subjectLine)."&body=".rawurlencode($body);
$technicalDump = "REDIRECT_STATUS: " . $_SERVER["REDIRECT_STATUS"] . "\n".
"HTTP_HOST: " . $_SERVER["HTTP_HOST"] . "\n".
"HTTP_X_REAL_IP: " . $_SERVER["HTTP_X_REAL_IP"] . "\n".
"HTTP_USER_AGENT: " . $_SERVER["HTTP_USER_AGENT"] . "\n".
"HTTP_ACCEPT: " . $_SERVER["HTTP_ACCEPT"] . "\n".
"HTTP_ACCEPT_ENCODING: " . $_SERVER["HTTP_ACCEPT_ENCODING"] . "\n".
"HTTP_ACCEPT_LANGUAGE: " . $_SERVER["HTTP_ACCEPT_LANGUAGE"] . "\n".
"HTTP_X_REAL_IP: " . $_SERVER["HTTP_X_REAL_IP"];
if($technical) $feedbackLink .= rawurlencode("\n\n====PLEASE DO NOT DELETE=====\nPage:".$INFO['id']."\nPerm:".$INFO['perm']."\nUser:".$INFO['client']."\nMobile:".$INFO['ismobile']."\nAction:".$ACT."\n====MORE TECH INFORMATION=====\n".$technicalDump);
if($sidebarPage) {
tpl_include_page("sidebar");
}else {
/*
*
* You can edit the HTML below to style your own sidebar
*
*/
echo '
<a class="mdl-navigation__link" href="'. DOKU_BASE . 'doku.php?id=wiki:dokuwiki">
<i class="material-icons" role="presentation">done_all</i>
First link</a>
<a class="mdl-navigation__link" href="'. DOKU_BASE . 'doku.php?id=playground:playground">
<i class="material-icons" role="presentation">done</i>
Second link</a>
<div class="mdl-layout-spacer"></div>
<a class="mdl-navigation__link" href="'. DOKU_BASE . 'about">
<i class="material-icons" role="presentation">info_outline</i>
About</a>
<a class="mdl-navigation__link" href="'. DOKU_BASE . 'help/">
<i class="material-icons" role="presentation">help_outline</i>
Help</a>
';
}
//TODO: do not overwrite the user's sidebar with every update