Extension:POD
|
POD Release status: stable |
|||
|---|---|---|---|
| Implementation | Tag | ||
| Description | Render POD (Plain Old Documentation) input as HTML | ||
| Author(s) | User:Tels | ||
| Last version | 0.06 (2007-05-05) | ||
| MediaWiki | 1.6.3 or better | ||
| License | No license specified | ||
| Download | search.cpan.org README CHANGES |
||
| Example | Example | ||
|
|||
|
|||
| Check usage and version matrix | |||
Contents |
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:
Browser [edit]
The browser supplies:
- the HTML-rendering,
- clickable links,
- spell-checking
Pod-Extension [edit]
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 Wiki [edit]
- central storage,
- version control,
- user management,
- visual diffs
Usage [edit]
Type your POD text between pod tags:
<pod> =head1 NAME =head2 Some Headline This is a test. </pod>
Custom POD [edit]
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).
Installation [edit]
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.x [edit]
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.2 [edit]
- 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='';
Parameters [edit]
This extension doesn't take any parameters except the input text between <pod> and </pod>.
Changes to LocalSettings.php [edit]
Add this line to your LocalSettings.php:
include_once('extensions/POD.php');
