Release status: stable
|Description||This extensions converts a MediaWiki to raw HTML ready for a drupal-installation.|
|Author(s)||Mathias Ertl (Mati talk)|
|License||GPL v3 or any later version.|
|Example||Convert this page|
ToHTML converts a MediaWiki page to HTML and prints the HTML in <pre></pre>-tags. This extension was written out of the desire to be able to write pages on a MediaWiki and then automatically convert them into a form that is ready for use in Drupal.
The HTML is specially manipulated to fit our needs, if you want to use the extension, you will have to modify it. It converts relative Wiki-URLs to absolute URLs (e.g. /wiki/ToHTML to http://fs.fsinf.at/wiki/ToHTML) and links to fsinf.at are made relative.
git clone https://github.com/mathiasertl/MediaWikiToHTML.git ToHTML
Older versions are marked as tags, you can view available tags with git tag -l and move back to the current HEAD with git checkout <tag-name>. Versions for older versions of MediaWiki, if available, are managed as branches, use git branch and git checkout <branch> to move to a specific branch. To move back to the newest version, use git checkout master.
Note that GitHub allows you to download older different commits as tarball if you do not want to install git.
Installation & Configuration
Simply download the extension into your extensions-directory and do a require_once in LocalSettings.php:
require_once( "$IP/extensions/ToHTML/ToHTML.php" );
After that, you can convert any page to HTML simply by giving it as a parameter to Special:ToHTML, like so:
http://vowi.fsinf.at/wiki/FAQ_Inskription is a MediaWiki-page. This page was converted using this extension (see red banner on top), and the HTML was copy+pasted into http://www.fsinf.at/infos/FAQ%20Inskription. Note that the red banner in the wiki-page will be automatically cut, and the three links directly below the banner will be expanded to the nice header and footer pointing to the next and previous page.
1.0.4 (rev. 336)
- Removed special parsing for the block-header and footer, this is now done by a Drupal extension.
- [[File:... links to directly point to VoWi
- Updated homepage link to this page
1.0.3 (rev. 320)
- Added action=raw HTML parameter.
- This version was tested with MediaWiki 1.15.1
1.0.2 (rev. 221)
- Updated translation to work in all wiki/user language combinations
- removed $wgToHTMLenable, nobody needs this.
1.0.1 (rev. 197)
- Updated to work with MediaWiki 1.11.1 and later by fixing LanguageGetSpecialPageAliases (This was a typo in 1.11.0, see Bug 11462)
- Updated link to this page (This wiki now uses Very short URLs)
- First version documented here
GPL v3 or any later version.