From Jimbojw.com
The AlternateSyntaxParser Extension is a MediaWiki extension which conditionally parses article text with an alternate syntax engine. This can be done either at the document level or site-wide.
It is released under The MIT License.
Compatibility
This extension requires:
- MediaWiki 1.6.x, 1.9.x, 1.10.x or higher
- PHP 4.x, 5.x or higer
Installation
- Create a folder in your $IP/extensions directory called AlternateSyntaxParser.
- Note: $IP is your MediaWiki install dir.
- Download AlternateSyntaxParser, and be sure to rename the downloaded file to AlternateSyntaxParser.php.
- Drop the downloaded script into $IP/extensions/AlternateSyntaxParser
- Enable the extension by adding this line to your LocalSettings.php:
require_once('extensions/AlternateSyntaxParser/AlternateSyntaxParser.php');
- Download the required libraries for chosen alternate syntaxes as specified below
- Note: If you don't download the libraries, the extension won't work!
Markdown
To support Markdown syntax:
- Download Michel Fortin's PHP Markdown or PHP Markdown Extra library:
- http://www.michelf.com/projects/php-markdown/
- Extract the file 'markdown.php' from the zip archive.
- Drop markdown.php into $IP/extensions/AlternateSyntaxParser/
Textile
To support Textile Syntax:
- Download Jim Riggs' TextilePHP library:
- http://jimandlissa.com/project/textilephp
- Extract the file 'Textile.php' from the downloaded archive.
- Drop Textile.php into $IP/extensions/AlternateSyntaxParser/
Usage
To use an alternate syntax in a page, put the following at the top of the page:
#MARKUP language
Where 'language' is the markup language - examples include 'markdown' and 'textile'.
Alternatively, you may specify a site-wide default alternate language by setting the $wgAlternateSyntaxParserLanguage variable in your LocalSettings.php. For examlpe, to make Markdown the default parsing syntax, you'd add:
$wgAlternateSyntaxParserLanguage = 'markdown';
Comments
Got something to say?
- Leave a comment
Sorry, comments are disabled.
or, read what others have said ...