PMWiki Plugins

Overview:

Wanderer LLC offers two super simple plugins for users of PMWiki, an open source, file-based (no database involved) Wiki that runs on PHP.  These plugins are very similar to existing plugins and, now, native functionality in PMWiki.  But, these do offer a little twist which may be useful to you:

  • Random Page – this plugin allows you to create a link to a random page on your site (skipping “RecentChanges” pages).  Just use this syntax:  (:randompage text=’Random article’ group=Articles:) The arguments have the following effects:
    • text – Optional.  This text will be used as the link text.  In the example above, the text will be “Random article”.  If you don’t supply this argument, the default text will be used.
    • group – Optional.  In the example above, supplying “Articles” causes the plugin to only choose from pages in the “Articles” group.  If you don’t supply this, all groups (meaning all pages on your site) will be used.
  • List Pages – this plugin will list all pages in a given group.  The plugin also makes the effort to insert spaces between your capitalized words so that the formatting looks nicer.  There’s currently no way to turn this off.  Use this syntax (:listpages group=Articles:) This code will generate a <ul> of links to every page in the “Articles” group.

To Install:

  1. Copy the PHP for each plugin that you want to your PMWiki’s cookbook folder.
  2. Add the following line(s) to your config.php file, which is in PMWiki’s local folder:

    include_once(“$FarmD/cookbook/listpages.php”);
    and/or
    include_once(“$FarmD/cookbook/randompage.php”);

That’s it!

You can download these two plugins here: