ToHTML: Unterschied zwischen den Versionen

Aus Free Software
Zur Navigation springen Zur Suche springen
 
Zeile 21: Zeile 21:
  
 
=== Download ===
 
=== Download ===
{{Download|dir=tohtml}}
+
{{Download/GitHub|dir=MediaWikiToHTML}}
  
 
=== Installation & Configuration ===
 
=== Installation & Configuration ===

Aktuelle Version vom 14. November 2014, 20:05 Uhr

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
ToHTML

Release status: stable

Implementation Special page
Description This extensions converts a MediaWiki to raw HTML ready for a drupal-installation.
Author(s) Mathias Ertl (Mati talk)
Version 1.0.4 (2010-08-07)
MediaWiki 1.11.1+
License GPL v3 or any later version.
Download see Download
ToHTML
Changelog
Example Convert this page
Hooks used

LanguageGetSpecialPageAliases

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.

Download

The source code of this extension is managed on GitHub. You can find the repository at mathiasertl/MediaWikiToHTML. To get the most recent version of this extension, fetch the current HEAD:

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:

Example

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.

ChangeLog

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)
1.0.0
  • First version documented here

Licence

GPL v3 or any later version.