User Tools

Site Tools


DokuWiki Tips/DokuWiki技巧

Tips Info
Change DokuWiki logoAdd logo.png(64×64) in <dokuwiki>\lib\tpl\<template>\images\
Remove traceSetting the breadcrumbs config option [1] to 0
Remove open user registration button
Remove page filename, date time & userIn <dokuwiki>\lib\tpl\<template>\main.php
comment out the following statement:
<div class="docInfo"><?php tpl_pageinfo() ?></div>


Add login/logoff log functionInstall Login/Logoff logging plugin
Remove buttons from the page footerIn <dokuwiki>\lib\tpl\<template>\tpl_footer.php
comment out the buttons defined in the code block:
<div class="buttons">


Add custom text (including Chinese) in the page footerIn <dokuwiki>\lib\tpl\<template>\tpl_footer.php, add the following code block:
  header("Content-Type:text/html; charset=utf-8");
  echo "<center>";
  echo "<i>Copyright © 2014 Max Kuan. All Rights Reserved.</i> <b>有著作權,未經許可請勿複製或轉載</b>";
  echo "</center>";
Remove “Recent changes,” “Media Manager,” and “Sitemap” for non logged in usersIn <dokuwiki>\lib\tpl\<template>\tpl_header.php, add the following IF test around the three tpl_action statements:
if ($INFO['userinfo']) {
  tpl_action('recent', 1, 'li');
  tpl_action('media', 1, 'li');
  tpl_action('index', 1, 'li');
Remove “Recent changes,” “Media Manager,” “Sitemap” for all usersSee Tips:Remove open user registration
Put “recent,” “media,” or “index” in “other actions (comma separated)” field
Remove right-side tool buttons for non logged in usersIn <dokuwiki>\lib\tpl\<template>\main.php, add the following IF test around the seven tpl_action statements:
if ($INFO['userinfo']) {
  tpl_action('edit',      1, 'li', 0, '<span>', '</span>');
  tpl_action('revert',    1, 'li', 0, '<span>', '</span>');
  tpl_action('revisions', 1, 'li', 0, '<span>', '</span>');
  tpl_action('backlink',  1, 'li', 0, '<span>', '</span>');
  tpl_action('subscribe', 1, 'li', 0, '<span>', '</span>');
  tpl_action('top',       1, 'li', 0, '<span>', '</span>');
Move page/namespaceInstall Move plugin
Add image gallery functionInstall Gallery plugin
Wraps text in various containerInstall Wrap plugin
Allow user-defined background colored cells in tablesInstall Cell_Background plugin
Format wiki titlePut the text in <p></p> and then put format codes such as <br> in the text. For example:<p>Patent Intelligence & Informetrics Lab<br>專利情報與資訊計量研究室 (PI2)</p>
Manually create a new installation of DokuWiki1.Create a new folder under directory /volume1/web
2.Copy a functioning DokuWiki folder structure to the new folder
3.Set the new folder's group to 'http' and apply to all subfolders (the owner should be 'admin')
4.Set the folder's permission to group 'writable' (originally the 'writable' box is not checked
Customize the login pageModify login.txt file in <dokuwiki>\inc\lang\en\
Customize the Permission Denied pageModify denied.txt file in <dokuwiki>\inc\lang\en\
Avoid url-encoded file nameSetting the fnencode config option to utf-8
dokuwikitips.txt · Last modified: 2014/11/24 23:02 by

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki