User Tools

Site Tools


wiki:wikis

  

MediaWiki

at Wikipedia

http://en.wikipedia.org/wiki/MediaWiki

a free and open-source wiki application, used to power wiki websites such as Wikipedia, Wiktionary and Wikimedia Commons; it was developed by the Wikimedia Foundation and others. It also runs thousands of other websites. It is written in the PHP programming language and uses a backend database.
The software is optimized to efficiently handle large projects, which can have terabytes of content and hundreds of thousands of hits per second.
The software has more than 800 configuration settings and more than 2,000 extensions available for enabling various features to be added or changed. On Wikipedia alone, more than 1000 automated and semi-automated bots and other tools have been developed to assist in editing.

PmWiki

Creating sub-pages in the sidebar:

* [[Health/CFS]] (: browser tab is labelled 'JH | CFS' :)
** [[Health/CFS/ME-links]] (: maybe the page exists, but it appears as an empty list item in the SideBar :)
** [[Health/ME-links]] (: browser tab is labelled 'JH | Health' - the safest choice, because navigating up goes to a real page (if I've created the 'Home Page' for this group, 'Health.Health') :)
** [[CFS/ME-links]] (: browser tab is labelled 'JH | CFS' - but there is no 'CFS' page to navigate up to :)

- navigating up from ME-Links to CFS ain't possible…

Editing:

Features, and the Success Stories show how versatile it is.

It uses an easy syntax, allowing fast creation of an informative site. I'm using it as a general landing page. I installed it from HostPapa's Softaculous, which involved the creation of a password that allows complete access, even to SiteAdmin. Backup and Restore lists the directories to know about, of which wiki.d/ contains the pages that you create. The minimal content required in each page file is explained at Arduino.

Passwords

For more general access, I followed the guidance at PasswordsAdmin to Encrypt a password in config.php. This involved first entering a password at my PmWiki installation's version of PasswordsAdmin?action=crypt, which fed back to me an encrypted form of the password, and these instructions:

To set a site-wide password, insert the line below in your config.php file, replacing 'type' with one of 'admin', 'read', 'edit', or 'attr'.

- which I followed, using Filezilla to download my local\config.php, and choosing edit as the type for the password (and adding a comment line):

## Sitewide edit block:
$DefaultPasswords['edit']='<my encrypted pw here>';

By choosing edit, I've protected all of my created wiki pages with that password. This did take time for me to figure out, but once done, it's easy, and instantaeous.

DokuWiki

  • DokuWiki System Requirements - need a PHP Server up, which is taken care of by a suitable web serving stack.
  • The Softaculous Blog on What you can do with DokuWiki is a quick intro.
  • While getting into vim, I began moving some of my own (ocd-ish) technical notes from *.odt format into plain text files, and immediately realised they lacked the visual readability provided by a program like LibreOffice, so I looked again at wikis, and settled on this one, because it doesn't use a database, and it's easy to learn. This file, for example, was added by just creating wikis.txt in the pages\wiki folder, and filling it with correctly formatted content. Sections are just subfolders of pages\. Neat.

http://en.wikipedia.org/wiki/DokuWiki https://www.dokuwiki.org/dokuwiki

It works on plain text files and thus does not need a database. Its syntax is similar to the one used by MediaWiki.

Where this page is stored:

  1. IT ⇒ my DokuWiki installation folder
  2. IT\data\pages ⇒ my DokuWiki root namespace
  3. IT\data\pages\start.txt ⇒ the entry page to my DokuWiki
  4. IT\data\pages\wiki (a folder that is part of the DokuWiki installation) ⇒ this subnamespace
  5. IT\data\pages\wiki\wikis.txt ⇒ this page!

Configuration

https://www.dokuwiki.org/config - has links to explain all the little details.

Basic Settings > title > ttoirrah's IT Notes is coded: ttoirrah&#039;s IT Notes.

Disable open user registration!

Display Settings:

  • breadcrumbs - 15 is better than default of 10 traced links
  • youarehere - I find helpful along with Trace
  • maxseclevel - 0 turns off the buttons for section editing

Disabling link icons is easy. Here's what I use.

Make your links open in a new brower window with _blank:

Configuration Manager > Links > Target window for external, internal, and media links > `_blank`

Namespaces & Pages

All text (when my IT dokuwiki was installed in Ampps) was in C:\Program Files\Ampps\www\IT\data\pages, and media are stored in neighbouring directory media. Everything is (and needs to be) named lower case with no spaces, like this (no +'s or &'s):

namespacesnamed_directories, pagesnamed_pages.txt

You can work directly in pages\ and media\, and Dokuwiki picks up the changes.

Installation

https://www.dokuwiki.org/install

Installed from Softaculous AAMPS:

DokuWiki has been successfully installed at: http://127.0.0.1/IT
Administrative URL: http://127.0.0.1/IT/doku.php?id=start&do=login

Upgrade

Manual: I downloaded then unpacked the tarball, copied it entire over my existing installation, ran the Powershell script, and touched conf/local.php to purge the cache. Then I installed removeold Plugin, and checked that I'd really removed the old files.

Wait for a day for update notifications to go away

Syntax quirks

> Quoted text like this should be followed by a blank line

  * if
  * there's
  * a
  * list
  * following

> and another before any more quotation

One of the huge advantages of keeping all of my IT notes in DokuWiki format is that I can work super-fast in gVim on my local DokuWiki text files, uploading them whenever I want. In general, the syntax is happily unobtrusive, but there are some quirks.

indented code

Beware not to leave a blank space after a hyperlink http:// 
  if followed by code

- all following syntax would be broken by that…


When indented code becomes a list:
    -size width[xheight][+offset]
  1. size width[xheight][+offset]
- so you're obliged to use some form of <code> tags.

quoted text then horizontal line

One blank line under a line of text suffices as separator before a horizontal line command.

----

- which creates this horizontal line:


  and this line of code also needs just one blank lines under it before applying a horizontal line command

----
like this.

> But quoted text
  followed directly by a line of code needs two blank lines before the horizontal line command


----
Like this
some code included in the quote, followed by an horizontal line.

Plugins

I like to write my DokuWiki pages directly in gVim, but the quote functionality requires unbroken lines in the text file, and my gVim does hard wrapping (breaks the lines at every 99 characters) by default. To make this not happen in these DokuWiki text pages, I add a vim modeline at the end, hidden from DokuWiki with Comment Plugin.

https://www.dokuwiki.org/plugins

- copy the Download URL and paste in the box at Extension Management.

sectiontoggle Plugin I prefer this to DokuWiki's in-page Table of Contents (which can be switched off by setting maxtoclevel=0).

Indexing

catlist and nspages - I couldn't get them to do exactly what I wanted, which is a tree'd index of subspace and page names. The highly rated Indexmenu broke my admin page!


So I just put a notice into my root start.txt:

:-) Use the ever-present Sitemap link - top right - to navigate!

-followed by a Cloud of most used words. (Put more words that you don't want it to find in conf/stopwords.txt.)

DW2PDF Plugin

DW2PDF Plugin

headers & footers are in lib/plugins/dw2pdf/tpl/default/. I prefer to:

  1. replace the contents of header_even.html with that of header_odd.html
  2. remove Printed on @DATE@ from footer_even.html
  3. remove @WIKI@ - from footer_odd.html (which makes it the same as footer_even.html)

saving as pagename

By default, this script pulls out the first title of a page, and uses that as the name for the pdf. This wasn't convenient behaviour for my notes, so I had a search around inside the source code, and homed in on action.php (= lib/plugins/dw2pdf/action.php when installed), line 70: $title = p_get_first_heading($ID);. It suffices to remove that function wrapping around $ID, like so: $title = $ID. With this change, pdf's are now named like this: namespace_subnamespace_pagename.pdf, which is perfect for my needs.

Wrap Plugin

https://www.dokuwiki.org/plugin:wrap - the acknowledged best for super-styling.

indent tests

div:

<WRAP indent>
> Do you know, Gertrude, I don’t mind your talking morality a bit.  Morality is simply the attitude we adopt towards people whom we personally dislike.  You dislike me.  I am quite aware of that.  And I have always detested you.  And yet I have come here to do you a service.
</WRAP>
Do you know, Gertrude, I don’t mind your talking morality a bit. Morality is simply the attitude we adopt towards people whom we personally dislike. You dislike me. I am quite aware of that. And I have always detested you. And yet I have come here to do you a service.

span:

> <wrap indent> Do you know, Gertrude, I don’t mind your talking morality a bit.  Morality is simply the attitude we adopt towards people whom we personally dislike.  You dislike me.  I am quite aware of that.  And I have always detested you.  And yet I have come here to do you a service. </wrap>
Do you know, Gertrude, I don’t mind your talking morality a bit. Morality is simply the attitude we adopt towards people whom we personally dislike. You dislike me. I am quite aware of that. And I have always detested you. And yet I have come here to do you a service.

- which is what I would like, but a little cumbersome to write. Still, I added a mapping into my vimfiles\ftplugin\dokuwiki.vim to help with those tags.

two column & span:

<WRAP col2>
> <wrap indent> Do you know, Gertrude, I don’t mind your talking morality a bit.  Morality is simply the attitude we adopt towards people whom we personally dislike.  You dislike me.  I am quite aware of that.  And I have always detested you.  And yet I have come here to do you a service. </wrap>
</WRAP>

~~~~~ and some following stuff ~~~~~
Do you know, Gertrude, I don’t mind your talking morality a bit. Morality is simply the attitude we adopt towards people whom we personally dislike. You dislike me. I am quite aware of that. And I have always detested you. And yet I have come here to do you a service.

~~~~~ and some following stuff ~~~~~

This would be for easier readability, but the spacing for that following new paragraph is out…

wiki/wikis.txt · Last modified: 2016/09/01 18:07 (external edit)