appwiki:dokuwiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
appwiki:dokuwiki [2021/05/19 17:41] – [Customize] yingappwiki:dokuwiki [2021/06/21 16:11] (current) – [old dokuwiki php 7.4 above error] ying
Line 17: Line 17:
 </code> </code>
  
 +=====  Customize ===== 
 +** hide sitemap index from non-login user **
 +  * check on Configuration Manager > sneaky_index
 +
 +**start page customize**
 +
 +  * admin panel > Configuration manager: Basic panel, starting point: change from "start" to "Welcome" as example, then create the page
 +  * (outdated way) /wiki/conf/dokuwiki.php <code php>
 +$conf['start'] = 'Welcome';           //name of start page
 +</code>
 +
 +
 +** change wiki page width **
 +  * method 0 - Toggle Page Width with Javascript, CSS and Side Tool customize on "/lib/tpl/dokuwiki/main.php"
 +    - step 1: edit main.php head part to add css and javascript function (jquery no need) <code html>
 +<style>
 +.fullpageOn{
 +    max-width: 100% !important;
 +}
 +</style>
 +<script>
 +// standard javascript here
 +function toggleFullPage() {
 +  var myPageClasses = document.getElementById("dokuwiki__site").classList;
 +  if (myPageClasses.contains("fullpageOn")) {
 +    myPageClasses.remove("fullpageOn");
 +  } else {
 +    myPageClasses.add("fullpageOn");
 +  }
 +}
 +</script>
 +</code>
 +    - step 2: edit main.php page action part <code html>
 +<!-- under PAGE ACTIONS -->
 +<!-- just above the last </ul> tag -->
 +<li><a href="#" onclick="toggleFullPage()" class="action" accesskey="w" rel="nofollow" title="Full Page Width [w]"><span>Full Page Width</span></a></li>
 +</code>
 +  * method 1 with css: <code css>
 +/* find css file in default template folder with class dokuwiki__site
 +#dokuwiki__site {
 +    max-width: 100% !important;
 +
 +</code>
 +  * method 2 with style.ini in default template folder ([[https://www.dokuwiki.org/template:dokuwiki|ref]]) <code>
 +__site_width__      = "100%"            ; @ini_site_width
 +#defaut
 +__site_width__      = "75em"            ; @ini_site_width
 +</code>
 +
 +**change "doku.php" in URL (you need repeat steps if you update dokuwiki)**
 +  - (updated 2021)
 +  - copy the file "wiki/doku.php" into "wiki/newName.php" (such as "page.php"; but can not be "index.php", as it is reserved for default)
 +  - edit wiki/index.php, replace all "doku.php" with "newName.php"
 +  - create wiki/inc/preload.php<code><?php
 +if(!defined('DOKU_SCRIPT')) define('DOKU_SCRIPT','newName.php');</code>
 +  - for link in some page that still link to doku.php, you may need to edit that page and update the page cache 
 +
 +**change wiki URL format**
 +  * edit wiki/conf/local.php part<code php>$conf['userewrite'] = 2;</code>
 +    * 0 : dokuwiki/doku.php?id=wiki:syntax (default)
 +    * 1 : dokuwiki/wiki:syntax (server side control)
 +    * 2 : http://example.com/dokuwiki/doku.php/wiki:syntax (doku side control)
 +
 +**change 2013 or later DokuWiki homepage logo (further if you want to change the favicon)**
 +  * method 1: use media manager, under wiki namespace, upload new logo to replace old one (:wiki:logo.png). ([[http://www.inmotionhosting.com/support/edu/dokuwiki/change-dokuwiki-appearance/change-dokuwiki-logo|ref]])
 +  * method 2: go dokuwiki\lib\tpl\dokuwiki\images, swap out the image with your same correct size one
 +    * apple-touch-icon.png
 +    * favicon.ico
 +    * logo.png
 +
 +**DokuWiki Favicon**
 +  * generate favicon from logo: http://www.favicon-generator.org/
 +  * loading priority sequence
 +    - $DokuWiki/data/media/favicon.ico
 +    - $DokuWiki/lib/tpl/dokuwiki/images/favicon.ico
 +    - $DokuWiki root/favicon.ico
 +    - web root/favicon.ico
 +
 +**change 2013 or later DokuWiki theme, top "Media Manager" link for non-user (repeat after each update)**
 +  * need to edit lib/tpl/dokuwiki/tpl_header.php file
 +  * then in the display "Media Manager" link part, add a user login condition check <code php>
 +tpl_action('recent', 1, 'li');
 +if(!empty($INFO['userinfo']['name'])){
 +tpl_action('media', 1, 'li'); 
 +tpl_action('index', 1, 'li'); 
 +}
 +// note: $INFO['client'] will give ip or username
 +// ref: $INFO variable in dokuwiki: https://www.dokuwiki.org/devel:environment
 +</code>
 +  * for new wiki check this<code php>
 +# change
 +tpl_toolsevent('sitetools', array(
 +    tpl_action('recent', true, 'li', true),
 +    tpl_action('media', true, 'li', true),
 +    tpl_action('index', true, 'li', true)
 +));
 +# into 
 +if(!empty($INFO['userinfo']['name'])){
 +    tpl_toolsevent('sitetools', array(
 +        tpl_action('recent', true, 'li', true),
 +        tpl_action('media', true, 'li', true),
 +        tpl_action('index', true, 'li', true)
 +    ));
 +}
 +else{
 +    tpl_toolsevent('sitetools', array(
 +       tpl_action('recent', true, 'li', true)
 +   ));
 +}
 +</code>
 +  * ref: http://stackoverflow.com/questions/15589912/dokuwiki-how-can-i-hide-media-manager-link-from-non-logged-in-users
 ===== DokuWiki plugins ===== ===== DokuWiki plugins =====
  
Line 37: Line 148:
     * ref:https://www.dokuwiki.org/config     * ref:https://www.dokuwiki.org/config
  
 +===== DokuWiki Templates Install =====
  
 +  - go Admin > Extension Manager: Search and Install tab, search the theme you want to install.
 +  - then, go to admin > Configuration Manager, Basic: Template to choose the installed template
 ====== Dokuwiki operation life-cycle maintain guide ====== ====== Dokuwiki operation life-cycle maintain guide ======
  
Line 321: Line 435:
     * ref: https://www.dokuwiki.org/config     * ref: https://www.dokuwiki.org/config
  
 +===== old dokuwiki php 7.4 above error =====
  
 +  * Problem: .\inc\init.php line 564 array error:
 +    * solution: "if($path{0} == '/'){" change to if($path[0] == '/'){
 +    * since new array will use [] instead {}
 +  * Problem: other plugin error like "A PCRE internal error occured. This might be caused by a faulty plugin."
 +    * solution: backup page and media folder under data, and move to new fresh copy of dokuwiki. (like in backup guide)
  
  
Line 398: Line 518:
     * https://www.dokuwiki.org/template:bootstrap3     * https://www.dokuwiki.org/template:bootstrap3
  
-===== Bootrap3 template for Dokuwiki =====+===== Bootstrap3 template for Dokuwiki =====
  
   * author page guide page:   * author page guide page:
Line 411: Line 531:
       - Bootstrap Wrapper Plugin: https://www.dokuwiki.org/plugin:bootswrapper       - Bootstrap Wrapper Plugin: https://www.dokuwiki.org/plugin:bootswrapper
       - icons plugin: https://www.dokuwiki.org/plugin:icons       - icons plugin: https://www.dokuwiki.org/plugin:icons
 +
 +  * custom Bootstrap3
 +    - admin > Configuration Setting, go bottom bootstrap3 part
 +    - bootstrap them, choose Bootswatch.com theme
 +    - select a theme : superhero
 +    - check show theme switcher (next, check hide them in switch list, recommend hide all except lumen,slate,superhero,yeti,darkly)
 +    - Navbar part:
 +      - display tools in navbar: when logged in
 +      - enable disable indivdual menu in navbar: check user
 +    - Layout part:
 +      - uncheck full width
 +      - table style: check all except condensed
 +      - uncheck display doku link on footer
 +    - TOC part
 +      - uncheck collapse for 2 option
 +    - Page part:
 +      - check AnchorJs
 +      - and uncheck collapse 2nd section level on mobile
  
   * navbar page for navbar:   * navbar page for navbar:
  • appwiki/dokuwiki.1621446102.txt.gz
  • Last modified: 2021/05/19 17:41
  • by ying