1<?php
2/*
3 *
4 * Edit this file to create your own sidebar.
5 * This allows you to fully customize it,
6 * for example you can choose any of icon available at https://material.io/icons/
7 *
8 */
9
10/*
11 * Choose if you want to render the sidebar DokuWiki page
12 */
13$sidebarPage = tpl_getConf('dokuwikiSidebar') == 1 ? true : false;
14
15
16/*
17 * Choose if you want to have a feedback form and if it should include technical information.
18 */
19$feedbackForm = tpl_getConf('feedbackForm') == 1 ? true : false;
20$technical = tpl_getConf('technicalFeedbackForm') == 1 ? true : false;
21
22
23/*
24* You can customize the feedback form below.
25*/
26
27$email = tpl_getConf('feedbackEmail');
28$subjectLine = tpl_getConf('feedbackSubjectLine');
29$body = tpl_getConf('feedbackBody');
30
31$feedbackLink = "mailto:".$email."?subject=".rawurlencode($subjectLine)."&body=".rawurlencode($body);
32$technicalDump = "REDIRECT_STATUS: " .   $_SERVER["REDIRECT_STATUS"] . "\n".
33    "HTTP_HOST: " .  $_SERVER["HTTP_HOST"] . "\n".
34    "HTTP_X_REAL_IP: " .  $_SERVER["HTTP_X_REAL_IP"] . "\n".
35    "HTTP_USER_AGENT: " .  $_SERVER["HTTP_USER_AGENT"] . "\n".
36    "HTTP_ACCEPT: " .  $_SERVER["HTTP_ACCEPT"] . "\n".
37    "HTTP_ACCEPT_ENCODING: " .   $_SERVER["HTTP_ACCEPT_ENCODING"] . "\n".
38    "HTTP_ACCEPT_LANGUAGE: " .  $_SERVER["HTTP_ACCEPT_LANGUAGE"] . "\n".
39    "HTTP_X_REAL_IP: " .  $_SERVER["HTTP_X_REAL_IP"];
40if($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);
41
42if($sidebarPage) {
43    tpl_include_page("sidebar");
44}else {
45    /*
46     *
47     * You can edit the HTML below to style your own sidebar
48     *
49     */
50    echo '
51        <a class="mdl-navigation__link" href="'. DOKU_BASE . 'doku.php?id=wiki:dokuwiki">
52            <i class="material-icons" role="presentation">done_all</i>
53            First link</a>
54        <a class="mdl-navigation__link" href="'. DOKU_BASE . 'doku.php?id=playground:playground">
55            <i class="material-icons" role="presentation">done</i>
56            Second link</a>
57        <div class="mdl-layout-spacer"></div>
58        <a class="mdl-navigation__link" href="'. DOKU_BASE . 'about">
59            <i class="material-icons" role="presentation">info_outline</i>
60            About</a>
61        <a class="mdl-navigation__link" href="'. DOKU_BASE . 'help/">
62            <i class="material-icons" role="presentation">help_outline</i>
63            Help</a>
64    ';
65}
66
67//TODO: do not overwrite the user's sidebar with every update