User Tools

Site Tools


dokuwiki

If you want to send us your comments, please do so. Thanks
More on comments


Dokuwiki

Dokuwiki home page
Dokuwiki syntax on the Dokuwiki website and a local copy which might not be current
Howto Upgrade Dokuwiki
Escape special characters
Dokuwiki cheatsheet

General

Pictures, Images

Installation

Via Installatron

  • Click on Install this application
  • Domain: Select the domain or subdomain
  • Directory (Optional): Nothing or as your needs are
  • Version: The recommended version
  • Language: English or as your needs are
  • DokuWiki [versionnumber] EULA: I accept the license agreement
  • Automatic Update: Update to new minor versions and security releases
  • Automatic Update Backup: Create a backup and automatically restore the backup if the update fails
  • Administrator Username: Choose a name
  • Administrator Password: Choose a strong password
  • Administrator E-mail: Where you want to receive e-mails
  • Website Title: At your choice
  • Advanced Setting Management: Let me manage these settings
    • E-mail Notification: Send all e-mail notifications for the installed application
    • Default Backup Location: My web hosting account
    • Automatic Backup: As your needs are. Can depend on the amount of pagechanges

Manual installation on a lighttpd server

Read the installation guide

  1. Install a webserver: aptitude install lighttpd
  2. cp dokuwiki-hash.tgz /var/www/html/
  3. tar xf dokuwiki-hash.tgz
    1. Deny Directory Access in Lighttpd
      1. vi /etc/lighttpd/lighttpd.conf
      2. Add url.rewrite-once = ( “^/dokuwiki/(data|conf|bin|inc|vendor)/+.” ⇒ “/nonexistentfolder” )
      3. Make sure “mod_rewrite”, and mod_access”, are present and uncommented in one of the server.modules = ( or server.modules += ( sections
      4. Add $HTTP[“url”] =~ “^/dokuwiki/(data|conf|bin|inc|vendor)/+.” { url.access-deny = (“”) }
      5. Save and close /etc/lighttpd/lighttpd.conf : Esc :x ENTER
      6. Run systemctl restart lighttpd.service; systemctl status lighttpd.service
  4. cd /var/www/html/dokuwiki
  5. You might want to read the Dokuwiki page on permissions
    1. chmod -R g+w config
    2. chmod -R g+w data
    3. touch conf/local.php.bak Needed to make sure modified settings are saved
    4. chown -R www-data:www-data
  6. In a browser open your dokuwiki. For a local install goto: 127.0.0.1/dokuwiki/install.php

Configuration

Login to Dokuwiki and goto Admin | Configuration Settings
More info

  • Don't show page title in TOC: The top page heading, often the page title, can be prevented from appearing in the TOC by setting toptoclevel to 2.

The default value for the Basic | “Sidebar page name (if template supports it), empty field disables the sidebar” option is sidebar

Can not save

Cannot save configuration changes: The config manager wants to save the old config to a backup before making any changes. Either make the conf directory writable or add an empty local.php.bak and change it's permissions as well.

Disableling opbjects

Disable in: Disable DokuWiki actions

  • Register
  • Delete Own Account
  • Subscribe/Unsubscribe
  • Update Profile
  • Set new password
  • View source/Export Raw (hides the view source button). This turns source view off but does not hide the button. To hide it the toolbuttondel plugin could work. Download and manual install toolbuttondel. It seems to do something totally different. It seems to do makeup things like bold and so on.
  • Other actions (comma separated) field. Do not place a comma after the last item

In the Display section

  • The trace can be disabled via the breadcrumbs option by setting it to zero
  • The page section editing buttons can be disabled by setting maxseclevel to zero

Nice URL's

Rewrite URL's

Changing the logo, the favicon and the Apple bookmark icon used by Apple and Android devices

The preferred size is 64 x 64 pixels

The favicon and logo can be uploaded via the Media Manager

It can also be manually uploaded to

  • $DokuWiki/data/media
  • Other possible locations kept here for reference
    • /wiki/lib/tpl/dokuwiki/images/favicon.ico, is in $DokuWiki/lib/tpl/dokuwiki/images (Can be removed on upgrades)
    • the web root (often /var/www)
    • the root of the DokuWiki directory: $DokuWiki

Favicon

The favicon has to have the name favicon.ico

Tips about favicons
How to generate a multi-resolution favicon with GIMP.
Use GIMP or favicon.cc to create a favicon named: favicon.ico

A picture of 16 x 16 pixels will do. 64 x 64 pixels also works fine

Download test favicons. They have 16×16, a 24×24, a 32×32, a 64×64, and a 128×128 pixel PNG images in it and display a number corresponding to their dimensions so you can see which size is used by various browser themes.

Test:

  • Open a new tab and load a page from the wiki in it
  • Check if the favicon appears in the tab.
  • Alternatively wait a while

The size of the logo has to be 64 x 64 pixels and of the png format

Change the Dokuwiki logo
Path: public_html/yourwikifolder/lib/tpl/dokuwiki/images

Issues

If the favicon or logo do not show the desired image

  • check if there are other files present and if so remove them.

Anti spam

indexdelay (Time delay before indexing (sec)): original: 60*60*24*5 (5 days). This is done to avoid wiki spam. It is not neede, set to 0, when only trusted people edit pages

Extensions, Plugins, that can be removed

Some extensions are not needed (by us) so it is better to remove them

  • (Deprecated) authentication (against a database) plugins
    • [DEPRECATED] MYSQL Auth Plugin
    • [DEPRECATED] Postgr Auth Plugin
    • authpdo plugin

Some handy extensions, plugins

It is advised to read the security information on dokuwiki.org first

  • BackupTool for DokuWiki
  • Blockquote Plugin
  • Bureaucracy Plugin (For forms use “= ” where applicable. The space is needed
  • Color syntax plugin
  • Cookielaw plugin
  • Date plugin
  • HeaderFooter plugin (data placed in folders data/pages and in the file data/meta/start.meta)
  • LangDelete
  • Logstats plugin
  • Removeold
  • Tag Plugin
  • Typography if you need a larger font size
  • Upgrade Plugin
  • Wrap plugin. Example page

Bureaucracy

Adding an ! at the end of the line indicates that the field is optional
Adding “ = “ means t.b.d.
Example of a form:

LangDelete

Inital screen

Make sure you delete all the languages on the Language(s) to keep: line. Initially they are all there

Issues

Warning: Invalid argument supplied for foreach() in /domains/somedomain.nl/public_html/lib/plugins/langdelete/admin.php on line 423
Warning: Invalid argument supplied for foreach() in //domains/somedomain.nl/public_html/lib/plugins/langdelete/admin.php on line 294

Possible solution (did not solve the issue for us): Set the language to 'en' in Admin > Configuration settings > Lang. Check if it sticks by doing Admin > Configuration settings > Lang again. If it does not stick set the language in conf/dokuwiki.php and conf/local.php to 'en'

Special characters

See also Entities
To avoid your changes being overwritten when Dokuwiki is upgraded, place your own additions in conf/entities.local.conf
If you want to be able to make a -- then change the conf/entities.conf file. Replace, on line 17 in the example on the github page,

--    -

(the single dash represents the somewhat longer dash) with

--    --

>

When '> ', as used in e-mails, is put in front of a line, as was done on this line the original formatting, new lines, are kept. No \\ is needed to add a newline character.

Spaces and tabs

Add to conf/entities.local.conf

\_  
(nbsp)  
(tab)     
(4tabs)                 

and other combinations as needed

A link to a chapter in the page itself looks like: [[#somechaptername|Sometext]]
An e-mail adres like name@domain.tld is shown as an e-mailadres link with an envelope icon in front. It can be needed to enclose the e-mail address with ”< >“

Upload files

If you need to be able to upload files with other file types then the allowed ones have a look in conf/mime.conf. Here you can see which file types are allowed to upload. If you need other file types to be able to upload create or edit mime.local.conf

Extensions starting with a ! are only downloadable and will not be shown in the browser
Issue: This did not work for us on Dokuwiki Release 2020-07-29 “Hogfather”

Warning: Enabling other file types for upload can be a security risk. You can set the ACL accordingly

Tables

New lines in a table (header)

^Header^With \\ \\ some text^Text^ # New line in a header does not work. See the example
|Record|Text \\ \\ word \\ more text|Text|

^Header^With

some text^Text^

RecordText

word
more text
Text

Remark: Sometimes (when?) the space before the \\ can be omitted

Table width

Install tablewidth plugin
Make the table with equal to the page with. Add on top of the table

|< 100% - - - >|

Check number of columns

Sometimes there is one “|” too much in a column. It can be hard to figure out which column it is. This might help
Save the page as a text file with the name clean.txt. Then run

cat clean.txt | tr -d [:alnum:] | tr -d [=,-_*-] | tr -d [$] | tr -d [\&\"] | tr -d [\(\)\!] | tr -d [:blank:] > clean.2.txt
less --LINE-NUMBERS clean.2.txt

Namespaces

The name

Can not contain spaces

Removing

They need to removed via FTP on the server in the folder wiki/data/pages

Clear the cache

When a page, or logo or favicon (in the tab or bookmark) does not update add this to the URL

&purge=true

like in

http://wiki.webevaluation.nl/doku.php?id=start&purge=true

and reload the page
Or clear the cache in by removing all files and folders in

/domains/webevaluation.nl/public_html/wiki/data/cache

RSS feed

The location of the RSS feed is

https://example.com/feed.php?type=rss

Replace example.com with the domain your Dokuwiki instance is hosted on
Replace http with https if applicable
Then enter the URL in your feedreader

Plugin installs

Log Stats plugin

More info on the plugin:logstats page

This plugin logs access to pages a nd media. The log can be analysed with an external progam. Some logfile-based loganalysers which are in the Debian repositary are AWstats (07-01-2018) analog (28-06-2015) and webaliser (26-08-2013). To be tested by us

The configuration file can be found at

wiki/lib/plugins/logstats/conf/default.php

It is advisable to add your own IP to the banlist in this file

The logfile can be found at

wiki/data/meta/access.log

Installing the statistics plugin

Read Plugin security
This if for a Direct Admin control panel
Webpage: Statistics plugin

  • Login in the Dokuwiki website
  • Click on Admin
  • Click on Extension Manager
  • Click on the Search and Install tab
  • Enter statistics in the search field and press Enter
  • Install the Statistics Plugin by Andreas Gohr
  • Log in to the Direct Admin control panel of your website
  • Click on MySQL Management
  • Create the MySQL database (write down the database name, the database username, and the database password)
  • Do wget www.<yoursite>/wiki/lib/plugins/statistics/db.sql or whatever link points to db.sql on your site
  • Login to phpMyAdmin
  • Click on Databases in the button bar on the top of the page
  • In the table with database click on the database which has been created
  • Click on Import in the button bar on the top of the page
  • Click on the Browse button
    • If you get an errormessage then, for Firefox allowing popup message / make an exception in Preferences | Content might solve the issue
    • Goto the just downloaded db.sql file, select it, and click the Open button
  • Click on the Go button
  • Click on the Logout button and close the phpMyAdmin tab in your browser
  • Goto your DokuWiki website and click on Admin
  • Click on Configuration Settings
  • In the menu on the right top side click on Statistics in the Plugin submenu
  • Fill the fields Your database user, plugin»statistics»db_password and Password for above user with the data you wrote down earlier
  • Click on the Save button on the bottom of the page
  • Click on Admin on top of the page again
  • In the subject Additional Plugins click on Access and Usage Statistics . Here your can find the statistics of your Dokuwiki site

Install the RemoveOld plugin

Read RemoveOld
Make a full backup via FTP of the wiki directory on the server
Goto Extension manager
Search and install

  • Search removeold
  • Enter
  • Install removeold Plugin by Taggic
  • Goto Admin
  • Click on Remove outdated files
  • Read the text

Install the Langdelete plugin

LangDelete Plugin by Taggic
Delete languages you do not need

Upgrading

See Upgrade

Pre upgrade

  • Install these plugins (see above)
    • Backup Tool
    • Delete languages
    • Remove outdated files
    • Wiki Upgrade
    • NOT YET: Cache and Revisions Eraser Plugin ( Has a bad checksum )
  • Empty /web/wiki/data/cache
  • To be investigated: Is it allowed to empty /web/wiki/data/meta
  • Run
    • Backup Tool
    • Download the backup
  • Run
    • Delete languages
  • Do a manual backup via a FTP program

Installing Upgrade plugin

  • Goto the Extension Manager
  • Click on Installed Plugins
    • Do CTRL-A
    • Open the Mousepad text editor
    • Do CTRL-V
    • Save the file
    • Now there is a list of installed plugins which can be handy if something breaks and the culprit plugin has to be found
  • Click on the Search and Install tab
  • Enter upgrade in the Search Extension: field and press ENTER
  • Look for the upgrade Plugin by Andreas Gohr in the search results
  • Click on the Install button

Perfoming the upgrade

  • Read the changelog page
  • Read the Install upgrade page
  • Goto the Admin page
  • Under the chapter Additional Plugins click on Wiki Upgrade
  • Click the Continue button
  • Follow the instructions and click the Continue → button another 6 times when the server is ready for it until you get back to the homepage of your Dokuwiki site
  • Ready

Post upgrade actions

After an upgrade it might be necessary to run

  • cd /var/www/html/dokuwiki
  • chmod -R g+w config
  • chmod -R g+w data
  • Goto Admin > Extension Manager
  • Click on the Installed Plugins tab
  • View Options > uncheck: “enabled” and “disabled”
    • Do CTRL-A and copy the text to a text editor so when a issues arises it is easier to determine which plugin is the cause
    • Open the Mousepad text editor
    • Do CTRL-V
    • Save the file
    • Now there is a list of upgradable plugins which can be handy if something breaks and the culprit has to be found
  • Now upgrade all upgradable plugins. Try to remember which plugin you upgraded last in case something breaks
  • Run the Remove outdated files plugin
  • Run the Delete languages plugin

Remove a plugin manually

  • Goto wiki/lib/plugins
  • Remove the folder of the offending plugin (do not rename it).

Bugs

When downloading a bash script from the <file bash filename.sh> tag 0x0d characters are added to the new line characters. They needed to be replaced with a hexeditor like ht from 0x0d to 0x0a. Also ^M characters in the text of the downloaded, saved and opened file have to be removed.


Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
dokuwiki.txt · Last modified: 12-03-2024 23:34 by wim