strict warning: Only variables should be passed by reference in /homepages/28/d137868653/htdocs/dp123/modules/book/book.module on line 560.

Wiki Module for Drupal

As explained in Drupal Wiki I wrote my own drupal module to wrap PMWiki to give me a fairly rich wiki in my Drupal site.

Download the Wiki module HERE

To install the module

  • Unpack the module file in the modules folder of your Drupal installation.
  • Go to Administration - User Management and grant permissions to use the PMWiki module.
  • Create a new input format for Wiki and add PMWiki to it (or add it to an existing Input Format)

Everything you need is in this download, no need to download or install anything else.

You also need to install freelinking and wikitools. The links features of PMWiki (apart from image links) is turned off, so that freelinking can handle them in a Drupal way.

What you get

Most standard PMWiki formatting should work. There is a new mark-up which causes the wiki to do absolutely nothing with the content - this allows for other Drupal modules - such as syntaxhighlighter - to handle the content.

Developer notes

Converting PMWiki to a Drupal module was a bit interesting because PMWiki relies on a load of global varibales, and these don't embed well within a module. So I had to declare the variables, and then create initialize methods for each PMWiki php file. Then in the module file, I had to explicity move the PMWiki globals to the global memory space. This is done by comparing the globals available before including PMWiki with those after and adding the new ones to the global space.

So if you want to add any PMWiki cookbook items to this module, you need to go through a similar process, i.e. add declarations for the globals, create an initialise method, call the initialise method from the module file, and hopefull, away you go.