Open main menu

Extension:POD

MediaWiki extensions manual
OOjs UI icon advanced.svg
POD
Release status: stable
Implementation Tag
Description Render POD (Plain Old Documentation) input as HTML
Author(s) User:Tels
Latest version 0.06 (2007-05-05)
MediaWiki 1.6.3+
License No license specified
Download search.cpan.org
README
CHANGES
Example Example
none
Released under the GPL
Translate the POD extension if it is available at translatewiki.net
Check usage and version matrix.

What can this extension do?Edit

This extension takes input in POD format, and converts it to HTML. Thus you can edit POD inside a wiki, and directly see the result.

This ties together several tools and creates a sort of IDE (Integrated Development Environment) for POD:

BrowserEdit

The browser supplies:

  • the HTML-rendering,
  • clickable links,
  • spell-checking

Pod-ExtensionEdit

By using Pod::Simple and some custom transformations, it brings:

  • instant POD check for correctness
  • correct formatting in HTML and working links
  • keyword display
  • collapsable table of contents
  • language selection (for multi-language documents)

The WikiEdit

  • central storage,
  • version control,
  • user management,
  • visual diffs

UsageEdit

Type your POD text between pod tags:

<pod>
=head1 NAME

=head2 Some Headline

This is a test.
</pod>

Custom PODEdit

You can also embed custom POD paragraphs like the following:

=begin graph

graph { flow: down; }
node { fill: thistle; }
[ POD | POD (graph) ] { basename: pod; }

[ pod.0 ] -- Mediawiki::POD --> [ HTML ] { fill: lavender; size: 2,0; }
[ pod.1 ] -- Graph::Easy --> [ HTML ]

=end graph

which will be rendering as "image" (either HTML, SVG, or PNG).

InstallationEdit

Download the extension from http://search.cpan.org/~tels/Mediawiki-POD, and install it into according to the README file.

PHP 4.x vs. 5.xEdit

Th extension was developed and tested with PHP 4.x. If you are using Mediawiki 1.8.x or better, then you are also using PHP 5.x. In this case you need to modify the extension, as it uses proc_open(), which was sadly changed in an incompatible way between PHP versions.

Notes under 5.1.2Edit

  • I had no problem with proc_open().
  • however I did get a "variable undefined" warning at line 57. This can be fixed by initialising $output in renderPOD(); just bafore
while (!feof($pipes[1])) {

(line 56) add:

$output='';

ParametersEdit

This extension doesn't take any parameters except the input text between <pod> and </pod>.

Changes to LocalSettings.phpEdit

Add this line to your LocalSettings.php:


 include_once('extensions/POD.php');

See alsoEdit