DokuWiki

DokuWiki
Really really easy wiki to setup and use!

Manual
https://www.dokuwiki.org/manual

Download
https://download.dokuwiki.org/

Template Themes
DokuWiki's layout can be customized through templates (aka. skins or themes). https://www.dokuwiki.org/template

Install
apt-get install apache2 php libapache2-mod-php php-mbstring php-xml imagemagick yum install httpd php ImageMagick
 * 1) ubuntu
 * 1) centos


 * 1) wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
 * 2) tar -zvxf dokuwiki-stable.tgz
 * 3) cd dokuwiki-2016*

wget https://download.dokuwiki.org/out/dokuwiki-c5525093cf2c4f47e2e5d2439fe13964.tgz -O dokuwiki.tgz tar -zvxf dokuwiki.tgz cd dokuwiki

Permissions: sudo chown -R www-data conf data sudo chown -R apache conf data
 * 1) ubuntu
 * 1) centos

sudo chown -R www-data lib/plugins lib/tpl sudo chown -R apache lib/plugins lib/tpl
 * 1) ubuntu
 * 1) centos

find conf -type d -exec chmod g+s {} \; find data -type d -exec chmod g+s {} \; find lib/plugins -type d -exec chmod g+s {} \; find lib/tpl -type d -exec chmod g+s {} \; chown -R www-data conf data
 * 1) alt 1

chmod -R o+w conf data chmod -R o+w lib/plugins lib/tpl Load install.php: http://[host]/dokuwiki/install.php
 * 1) alt 2
 * 2) or really relaxed bad permissions

After configuring, delete install.php: rm install.php
 * 1) mv install.php install.php.disabled

Cleanup: find. -name "_dummy" -exec rm {} \; rm -rf data/pages/*

Apache
 ServerName doku.oeey.com

DocumentRoot /www/dokuwiki

 Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny Allow from all  

Security
Reverse Heading Levels (Like Wikipedia)

install:permissions [DokuWiki] - https://www.dokuwiki.org/install:permissions

sudo chown -R apache conf data sudo chown -R www-data conf data

Extension Manager: sudo chown -R www-data lib/plugins

Theme Manager: sudo chown -R www-data lib/tpl

Configure
http://doku.oeey.com/doku.php?id=start&do=admin&page=config

Basic:
 * Wiki title aka. your wiki's name: [wiki name]
 * Page name to use as the starting point for each namespace: "home"
 * Warning, this will be the default page for all namespaces!
 * Tagline (if template supports it): "my tagline"
 * Server URL: http://doku.oeey.com
 * dmode: 02775 (from 0755)
 * fmode: 0664 (from 0644)

Display:
 * Use hierarchical breadcrumbs (you probably want to disable the above option then): [X]
 * By default, DokuWiki will show all namespaces in the sitemap. [X]

Media:
 * Path to ImageMagick's convert tool: /usr/bin/convert

Editing:
 * htmlok - securityAllow embedded HTML [X]

Advanced:
 * Use nice URLs: .htaccess
 * Use slash as namespace separator in URLs: [X]

URL Rewriting
Enable rewrite:  #Options Indexes FollowSymLinks MultiViews Options -Indexes -MultiViews +FollowSymLinks AllowOverride all Order allow,deny allow from all 
 * 1) Ubuntu

rewrite [DokuWiki] - https://www.dokuwiki.org/rewrite

Turn: http://example.com/doku.php?id=page

Into: http://example.com/page

Directions:
 * 1) Go to Admin
 * 2) Open Configuration Manager
 * 3) Change Nice URLs option to .htaccess (use find, it's far down)
 * 4) Underneath it, check the option to “Use slash as namespace separator in URLs”
 * 5) .htaccess

doku folder: cp .htaccess.dist .htaccess
 * 1) hidden file

Apache:  AllowOverride All 

.htaccess: (uncomment the following) RewriteEngine on RewriteRule ^_media/(.*)             lib/exe/fetch.php?media=$1  [QSA,L] RewriteRule ^_detail/(.*)            lib/exe/detail.php?media=$1  [QSA,L] RewriteRule ^_export/([^/]+)/(.*)    doku.php?do=export_$1&id=$2  [QSA,L] RewriteRule ^$                       doku.php  [L] RewriteCond %{REQUEST_FILENAME}      !-f RewriteCond %{REQUEST_FILENAME}      !-d RewriteRule (.*)                     doku.php?id=$1  [QSA,L] RewriteRule ^index.php$              doku.php

Formatting
Hello world

new\\ line


 * bold**

//italics//

__underline__

string-through

monospace

''monospace\\ oooooooooo\\ iiiiiiiii''

monospace oooooooooo iiiiiiiii

Level 1 Headline
"=" = 7 - n

Level 5 Headline
horizontal rule:

test

internal page label

[|External Link]

- number item 1 - number item 2

* item 1 * item 2

Images
Internal Image: (centered)\\

Width:

Height:

WidthxHeight:

External Image: (centered)\\

\\ \\ \\ \\

width 10 image:\\

Title:

By using left or right whitespaces you can choose left, right or center alignment.

Templates
template [DokuWiki] - https://www.dokuwiki.org/template


 * "DokuWiki's layout can be customized through templates (aka. skins or themes). "


 * 1)    Just extract the downloaded template archive (usually a .zip or .tgz file) in the lib/tpl/ folder2).
 * 2)    Then select the template in the Config Manager by adjusting the template option.

Bootstrap Simplified Template

 * https://github.com/badeendjuh/dokubootstrap-simplified


 * https://github.com/badeendjuh/dokubootstrap-simplified/archive/master.zip

Name Spaces
namespaces [DokuWiki] - https://www.dokuwiki.org/namespaces

Use ":" to separate name spaces

TODO: find out how to do '/' name spaces?

Use slash for namespace
you can use this option additionally to use a slash instead of a colon as namespace separator in URLs.

config:useslash [DokuWiki] - https://www.dokuwiki.org/config:useslash

Bread Crumbs
Navigation Breakcrumbs (for name spaces)

breadcrumbs [DokuWiki] - https://www.dokuwiki.org/breadcrumbs

Name Space Table of Contents
See

Table of Contents Plugin
plugin:nspages [DokuWiki] - https://www.dokuwiki.org/plugin:nspages

Install: cd doku/lib/plugins wget https://github.com/gturri/nspages/zipball/master -O nspages.zip unzip nspages.zip mv gturri-nspages-2a76987 nspages

MRedirect Plugin
Redirection plugin - any page containing nothing but a standard link will auto-redirect instantaneously

plugin:mredirect [DokuWiki] - https://github.com/M0rtenB/dokuwiki-mredirect/zipball/master

cd doku/lib/plugins wget https://github.com/M0rtenB/dokuwiki-mredirect/zipball/master -O mredirect.zip unzip mredirect.zip mv M0rtenB-dokuwiki-mredirect-7dd0287 mredirect

Tag Plugin
Assign category tags to wiki pages

Examples: with namespaces: mutiple word tags:

cd doku/lib/plugins wget https://github.com/dokufreaks/plugin-tag/tarball/master -O tag.tar.gz tar -zvxf tag.tar.gz mv dokufreaks-plugin-tag-92d6176 tag

plugin:tag [DokuWiki] - https://www.dokuwiki.org/plugin:tag

Reverse Headings
https://www.dokuwiki.org/plugin:creole

Changes: cd doku/lib/plugins wget https://github.com/dokufreaks/plugin-creole/zipball/master -O creole.zip tar -zvxf creole.zip mv dokufreaks-plugin-creole-f36bf24 creole
 * Listblock
 * Reverse Headings
 * Linebreaks (dokuwiki linebreaks are correct in creole 1.0)
 * Preformatted
 * Tables
 * Subscript
 * Superscript
 * Monospace

Markup precedence (after installing Creole)

Settings: (my suggestions) Markup precedence: Creole Monospace behaviour: Use  tag Replace a linebreak with: Linebreak

References:
 * faq:reverse_headers [DokuWiki] - https://www.dokuwiki.org/faq:reverse_headers
 * I'd like to reverse the header syntax.
 * It's possible to reverse the header syntax by using the creole plugin

CAPTCHA
plugin:captcha [DokuWiki] - https://www.dokuwiki.org/plugin:captcha

cd doku/lib/plugins wget https://github.com/splitbrain/dokuwiki-plugin-captcha/zipball/master -O captcha.zip tar -zvxf captcha.zip mv captcha-* captcha

Section Editing
https://www.dokuwiki.org/plugin:editsections2

The “editsections” plugin moves edit section buttons up to the heading they belongs to. Configurable for nested (hierarchical) or flat edit sections. Nested edit sections cover the same indentation level as their heading.

Note: "If you prefer having your edit button beside the header, see the plugin editsections2"

Hide Footer
Edit dokuwiki/lib/tpl/dokuwiki/tpl_footer.php

or empty the tpl_footer.php file

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

Hide Last modified
Comment out the tpl_pageinfo call in the appropriate template file
 * 1) lib/tpl/bootie/main.php - line 112



Disabled Old Revisions
Disable the button in the config
 * Disable DokuWiki actions - Old revisions

Old revisions will still be generated, but won't be accessible.

To disable generation of old revisions, comment out the io_writeWikiPage in the function saveOldRevision: inc/common.php 1370c1370 <    io_writeWikiPage($newf, rawWiki($id), $id, $date); --- >    //io_writeWikiPage($newf, rawWiki($id), $id, $date);

utf8_encode is not available
PHP function utf8_encode is not available. Maybe your hosting provider disabled it for some reason

Test: php -r 'print utf8_encode("fooo");'

References:
 * DokuWiki's installer says utf8_encode and utf8_decode are not available, any ideas how to fix this? : PHP - https://www.reddit.com/r/PHP/comments/39b68u/dokuwikis_installer_says_utf8_encode_and_utf8/

Invalid command RewriteEngine
.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration


 * 1) ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load

sudo a2enmod rewrite && sudo service apache2 restart

apache - .htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration - Stack Overflow - http://stackoverflow.com/questions/10144634/htaccess-invalid-command-rewriteengine-perhaps-misspelled-or-defined-by-a-m

keywords
dokuwiki wiki document crm