Open main menu

Changes

970 bytes added ,  12:13, 25 February 2015
no edit summary
This extension to MediaWiki is used to import HTML content (including images) into the wiki. Imagine having dozens, hundreds, maybe thousands of pages of HTML. And you want to get that into your wiki. Maybe you've got a website, or perhaps a documentation system that is in HTML format. You'd love to be able to use your wiki platform to edit, annotate, organize, and publish this content. That's where the '''Html2Wiki''' extension comes into play. You simply install the extension in your wiki, and then you are able to import entire zip files containing all the HTML + image content.
== Requirements or Dependencies ==
== Usage ==
Select === System Elements ===Once installed, the Html2Wiki extension makes a new form available to Administrators of your wiki. Simply choose a file using , click '''import''' and watch as your HTML is magically transformed into Wiki text. You access the import HTML form found on at the <code>Special:Html2Wiki </code> page (similar to <code>Special:Upload </code> for regular imagesmedia). When Special:The Html2Wiki is installed, it extension also adds a convenient '''Import HTML''' link to the '''Tools' section '' panel of your wiki, for quick easy access to the importer. === Single File ===
Enter a comment in the Comment field, which is logged in the 'Recent Changes' content as well as the Special:Log area.
You can optionally specify a "Collection Name" for your content. The Collection Name represents where this content is coming from (e.g. The book, or website). Any unique identifier will do. The "Collection Name" is used to tag (categorize) all content that is part of that collection. And, all content that is part of a Collection will be organized "under" that Collection Name in a hierarchy. This lets you have 2 or more articles in your wiki named "Introduction" if they belong to separate Collections. Specifying an existing Collection Name + article title will update the existing content. In fact, to reimport a single file and maintain it's 'position' in a collection, you would specify the full path to the file.
== Uploads in MediaWiki = Zip File ===How does upload work?Choose a zip file to import. The Zip file can contain any type of file, but only html and image files will be processed.
Parsoid.hooks.php has a hook <code>onFileUpload</code>, which refers to <code>filerepo/file/LocalFile.php</code>
 
If I'm reading it correctly, LocalFile.php is mostly called from a Repo object.
 
<code>LocalFile::upload()</code> and <code>recordUpload()</code> are informative.
== Mechanics ==
== Zip archive handling ==
The best way to setup a full development environment is to use [https://www.mediawiki.org/wiki/MediaWiki-Vagrant MediaWiki Vagrant]. This handy bit of wizardry will create a full LAMP stack for you and package it into a VirtualBox container (among others).
 
 
== Uploads in MediaWiki ==
How does upload work in MediaWiki?
 
Parsoid.hooks.php has a hook <code>onFileUpload</code>, which refers to <code>filerepo/file/LocalFile.php</code>
 
If I'm reading it correctly, LocalFile.php is mostly called from a Repo object.
 
<code>LocalFile::upload()</code> and <code>recordUpload()</code> are informative.
{{References}}
4,558

edits