User Tools

Site Tools


dokuwikitips

DokuWiki Tips/DokuWiki技巧

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

See https://forum.dokuwiki.org/thread/858

Add login/logoff log functionInstall Login/Logoff logging plugin
https://www.dokuwiki.org/plugin:loglog
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">
...
</div>

See http://www.inmotionhosting.com/support/edu/dokuwiki/change-dokuwiki-appearance/removing-footer-buttons-text

Add custom text (including Chinese) in the page footerIn <dokuwiki>\lib\tpl\<template>\tpl_footer.php, add the following code block:
<?php
  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
https://www.dokuwiki.org/plugin:move
Add image gallery functionInstall Gallery plugin
https://www.dokuwiki.org/plugin:gallery
Wraps text in various containerInstall Wrap plugin
https://www.dokuwiki.org/plugin:wrap
Allow user-defined background colored cells in tablesInstall Cell_Background plugin
https://www.dokuwiki.org/plugin:cellbg
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 (external edit)