You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

67 lines
2.5 KiB

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