User Tools

Site Tools


tech:software_dokuwiki

2000px-dokuwiki_logo_1.jpg

Royce explains how to use DokuWiki. Aka, how Jack and Jill Went up the Wiki Hill. Explained as a story of friends.

.

Introduction: Examples of the learning process and best practices for building and maintaining a DokuWiki site. This article will describe the basics, scripting, shortcuts, and where to get support. Much of the following article is explained in technical terms here, including very advanced features: http://ontu.org/w/doku.php?id=wiki:syntax

.

.

.

.

Jack wants to change the header logo and background color. He made a cool logo in Windows Paint, roughly 80 pixels by 80 pixels but it doesn't matter, and saved it. DokuWiki only allows the file name to be Logo.PNG. At his site he clicks Media Manager below the search box, and then clicks the Wiki area. Then goes to upload and ensures Overwrite is checked. Eventually he got fancy and used Photoshop to make the border of his logo transparent, then Exported as a low-color PNG. Then went to DokuWiki's Admin area to change the background color to a festive neon green.

.

Jill wants a subtle tiling background image for her entire website. She isn't sure why DokuWiki doesn't natively support this. The “Loadskin Plugin” and “wallpaper Template” are great but a bit overkill for this. So the code she found is…. To be updated.
.
Jill uses the default template (visual theme) but does have a little custom code. When she updates DokuWiki, her code disappears. But she's prepared, she has the code on her flashdrive, in a notepad document.

.

Jack created an internal link to one of his pages, which is a link to a page on his own DokuWiki. To link to his page about comedy, he types this:

[[humor|]]

And to link to his page called Asian Humor, which is a subpage of his Humor page, he types this without spaces in the brackets, and using an _ instead of spaces in the page name:

[[humor:Asian_Humor |]]

If the page doesn't already exist, it will be created when the link is clicked and he edits the freshly created page. Until the page is edited, the link shows up in red color. So Jack writes a list of the 20 new pages he wants to make, and makes them simply by clicking the links.

.

Linebreaks. Jack notices DokuWiki doesn't respect his linebreaks, as to say, when he presses Enter. So instead, he's happy with pressing Enter and then placing a single period. It's not ideal, but it's an easy way to maintain linebreaks, especially when using plugins which may not respect other methods of linebreaks.

.

Indents. Jack wanted an indented line, so he can use CKEdit Plugin, or he can type > at the start of every line. Typing two of these, indents the line further. As you can see below, you can make text deeply indented. This method places a grey stripe on the left. As seen here;

>The>>cat
>>>in
>>>>the
>>>>>hat
>>>>>>rules.

becomes

The
cat
in
the
hat
rules.

.

Jack wants to edit a text file in his hosting account, to add a little custom code. So he logs into his Hosting Company (for me it's GoDaddy) and clicks Hosting, then Manage Hosting, then CPANEL, then File Manager, and ensures ShowHiddenFiles is enabled. If it asks what folder to show, select DokuWiki instead of Root.

.

Jill created a long horizontal dash by typing three small dashes together. Making this —

.

Public Comments: Jack wanted a public comment box on specific pages, with no login needed. So at the top of his website he clicks Admin, then Extension Manager, then Search & Install, and types Comments. He notices a great one in the results called Discussion. Which is available here: https://www.dokuwiki.org/plugin:discussion where he can install or report bugs, and read how it works. Now when he edits any page, he can simply type this with no spaces: ~~ DISCUSSION ~~

Jack found out that if he wants to be email notified of new comments, especially screened “moderated” comments, he needs to input his DokuWiki username into the Moderator Group box. He can see all comments on one page by going to his Admin page.

And on a private administration page, Jack can view all comments of all pages by adding the following to a page, but taking notice that he may need to install “Pagelist Plugin”:

{{threads>*}}

.

.

.

.

.

* Jill's own website blocks some of her pages. She's the only user, so she disables Anti-spam Wordlist. This way, none of her entries can be auto-flagged as Spam. When logged in, she goes to Admin at the top of the page, then Configuration Settings, then click Anti-Spam in the TableOfContents. Uncheck “Block spam based on wordlist” then scroll to the bottom and click Save.

.

* Jack wishes to disable people from applying for membership on his site. He logs in, goes to Admin at the top of the page, clicks Configuration Settings, then clicks Authentication in the TableOfContents, and unchecks Register (notice it among a big group of checkboxes, or search the page for Register). Then scroll to the bottom and click Save. Hopefully, instead there may be a way to disable the Toolbar for people not logged in.

.

* Hot Linking an Image from another Website. Jill displays a photo from another website she owns, by using this code (with no spaces). She knows not to link to images she doesn't own, because someone has to pay the hosting for those images. This code can embed images of gif, jpg, png; or video of webm, ovg, mp4; or audio of ogg, mp3, wav, swf. From any internet source.

[[http://php.net|{{wiki:dokuwiki-128.png}}]]

.

* YouTube or Embed HTML using iFrames. Jill uses too many plugins, she just wants to show a YouTube cat video. Why isn't this a normal feature? No one knows. This is easy as long as she's the only user on her website, because this method can be taken advantage of by bad users. Using iFrames, you can embed whatever video or website (sadly even a dangerous one) onto your DokuWiki. Set your DokuWiki settings to allow iFrames, by going to Admin, then Configuration Settings, then click Editing in the TableOfContents, and check “Allow Embedded HTML”, then click Save at the bottom of the page. Now on any page, use the following code. Replace c29XPAVy65o with the similar number located in the address of your desired YouTube video. DokuWiki requires the HTML part to be there, so don't delete that…

HTML Code for YouTube.

* Jill needs to display raw code without DokuWiki formatting it. She types the following:

<code> Raw code pasted here, will retain Spaces and Enter, and show up in a grey box</code>

Or the following two methods remove when you pressed Enter on the keyboard:

<nowiki> Raw code pasted here </nowiki>

Or simply type %% at the start and end of your code, but it will be converted to NoWiki.

.

.

.

.

.

Some of Royce's Favorite Plugins

* CKEdit vastly improves the typing experience, making DokuWiki more like using Microsoft Word. And less like a scripting language.

* DokuWiki Updater will automatically update your DokuWiki to the latest stable version.

* Discussion, is a plugin allowing you to have an easy Public Comments box on any page you like. I discussed the usage above under the “Public Comments” headline.

.

.

.

.

Internet Resources

* Code for all the basic features of DokuWiki: https://www.dokuwiki.org/wiki:syntax

* Official Site: https://www.dokuwiki.org/

* Official Support Forum: https://forum.dokuwiki.org/

* DokuWiki vs MediaWiki at Wiki Matrix comparison site:

* Wikipedia Article: https://en.wikipedia.org/wiki/DokuWiki

.

.

.

.

End of Article.

Discussion

Enter your comment. Wiki syntax is allowed:
 
tech/software_dokuwiki.txt · Last modified: 2018/02/12 21:49 by reb