Difference between revisions of "How to make dokuwiki a good mediawiki"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 19: Line 19:
 
* with two mediawiki instances, it is still not possible to have one page public to group A, and another one visible to group B.
 
* with two mediawiki instances, it is still not possible to have one page public to group A, and another one visible to group B.
  
 +
= Adapting dokuwiki =
 
What stays is to modify dokuwiki to get mediawiki's look-and-feel and its syntax. To do this, use http://www.dokuwiki.org/template:monobook, then adapt :wiki:navigation to contain  
 
What stays is to modify dokuwiki to get mediawiki's look-and-feel and its syntax. To do this, use http://www.dokuwiki.org/template:monobook, then adapt :wiki:navigation to contain  
 
<pre>
 
<pre>
Line 25: Line 26:
 
* [[http://yourhost/dokuwiki/doku.php?id=wiki&do=admin&page=statistics|Statistics]]
 
* [[http://yourhost/dokuwiki/doku.php?id=wiki&do=admin&page=statistics|Statistics]]
 
</pre>
 
</pre>
 +
 +
The next hindering thing in day-to-day operation will be the "edit" buttons. Mediawiki users are used to "edit" buttons that edit the section ''below'' them, not ''above'' them. To get re-arrange the buttons in a mediawiki, there is the [http://www.dokuwiki.org/plugin:editsections EditSections Plugin]. If this [https://github.com/dr4Ke/editsections/issues/1 does not work again], you can also apply this simple patch:
 +
<pre>
 +
--- dokuwiki-1/inc/parser/xhtml.php    2011-06-14 21:58:54.000000000 +0200
 +
+++ dokuwiki/inc/parser/xhtml.php      2011-07-10 18:09:07.000000000 +0200
 +
@@ -183,6 +190,7 @@ class Doku_Renderer_xhtml extends Doku_R
 +
        }
 +
        $this->doc .= '><a name="'.$hid.'" id="'.$hid.'">';
 +
        $this->doc .= $this->_xmlEntities($text);
 +
+        $this->finishSectionEdit();
 +
        $this->doc .= "</a></h$level>".DOKU_LF;
 +
    }
 +
 +
</pre>
 +
  
 
= See also =
 
= See also =

Revision as of 18:09, 10 July 2011

Comparing dokuwiki and mediawiki I come to the result that

mediawiki has the advantages

  • look and feel
  • known markup language
  • edit buttons are above the section to be edited

while dokuwiki has the advantages

  • ACL's allow me to keep pages invisible
  • backup is easy because it is plain files

So to get to my perfect wiki there are two basic ways:

  • use mediawiki and patch/extend it until is can do ACL's. Accept that for a backup, a script is needed.
  • use dokuwiki and patches/plugins/skins until it looks like mediawiki and uses mediawiki's markup

Reading this discourages going the first path with authorization extensions. So the only way to secure mediawiki would be to set up several mediawiki instances, an internal one, a public one and so on. This provokes so many problems that I decided not to go this way. The problems are:

  • you will have to do "recent changes" on both mediawiki instances in order to see the complete picture
  • you will have to search on both mediawiki instances
  • with two mediawiki instances, it is still not possible to have one page public to group A, and another one visible to group B.

Adapting dokuwiki

What stays is to modify dokuwiki to get mediawiki's look-and-feel and its syntax. To do this, use http://www.dokuwiki.org/template:monobook, then adapt :wiki:navigation to contain

* [[:start]]
* [[http://yourhost/dokuwiki/doku.php?do=recent|Recent Changes]]
* [[http://yourhost/dokuwiki/doku.php?id=wiki&do=admin&page=statistics|Statistics]]

The next hindering thing in day-to-day operation will be the "edit" buttons. Mediawiki users are used to "edit" buttons that edit the section below them, not above them. To get re-arrange the buttons in a mediawiki, there is the EditSections Plugin. If this does not work again, you can also apply this simple patch:

--- dokuwiki-1/inc/parser/xhtml.php     2011-06-14 21:58:54.000000000 +0200
+++ dokuwiki/inc/parser/xhtml.php       2011-07-10 18:09:07.000000000 +0200
@@ -183,6 +190,7 @@ class Doku_Renderer_xhtml extends Doku_R
         }
         $this->doc .= '><a name="'.$hid.'" id="'.$hid.'">';
         $this->doc .= $this->_xmlEntities($text);
+        $this->finishSectionEdit();
         $this->doc .= "</a></h$level>".DOKU_LF;
     }


See also


This article is a stub and needs improvement. You can help here :)