MediaWiki Features

Last modified by Arun Reddy on 2009/07/09 15:37

MediaWiki Features

This article explains various features of MediaWiki which have to be taken care of during its import into XWiki. 

Structure of MediaWiki

Pages

  • Wiki Pages      : All the Important Wiki Pages are in Main NameSpace. 
  • Wiki Talk Pages : And the respective Talk Pages as sub pages or as comments of the respective pages.
      ( Discussion pages) 
  • User Pages      : We can use them to create XWiki User objects.
  • Templates       : The contents of any page on wiki can be inserted into other pages. Pages that are to be transcluded are called "templates".
    We can treat them as normal Wiki Pages and handle them using include macro.
  • Redirect pages  : We can replace the content with the page redirection code.
  • Special Pages   : We dont need them.
  • CSS/JS Pages.   : We can use Skin Extensions. Save the pages as JSX or SSX objects. 

Files or Attachements

The files like images, pdfs and other formats are saved locally in a folder. The main resources folder further has three sub-folders archive, temp, thumb.

  • Main Folder : Place for latest versions of the files. ( eg : Boston_City_Flow.jpg) 
  • archive : Place for the original image files, that have been replaced by newer versions. (archived pic : 20090610045842!Boston_City_Flow.jpg - Time stamp as Prefix )
  • thumb : A copy of thumb nail or orginal image.

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [gsoc:Import Export other wikis.MediaWiki Features]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

Permissions

  • Users: Normal Users can create, edit, create new revisions of existing ones or revert to older versions.
  • SysOps(System Operators) : Protecting Pages ( cant be edited by User), deleting, blocking users and patrolled edits.
  • Bureaucrats : Has right to promote users to be sysops (and demote sysops to normal users).

Categories

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [gsoc:Import Export other wikis.MediaWiki Features]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

InterWiki Linking

A system of short-handed link labels are used to refer to different projects, in the context of interproject linking.

[[Wikipedia:XWiki_Page]] --> http://en.wikipedia.org/wiki/XWiki_Page --> [[w:XWiki_Page]]

Wikipedia is replaced by 'w'.

Parser Functions & MediaWiki Magic Words

Media Wiki Parser Functions
Media Wiki Magic Words

To be handled by the MediaWikiSyntax Parser. 


MediaWiki Export Formats

MediaWiki can be exported in various formats and tools are available.

  • XML format  
  • Directly from Database

XML Format Explained

XML dumps contain the content of the wiki (wiki pages with all their revisions), without the site-related data (it does not contain user accounts, image metadata, logs, etc).

A typical XML File :

<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.3/ http://www.mediawiki.org/xml/export-0.3.xsd" version="0.3" xml:lang="en">
<siteinfo>
<sitename>MediaWiki</sitename>
<base>http://www.mediawiki.org/wiki/MediaWiki</base>
<generator>MediaWiki 1.15alpha</generator>
<case>first-letter</case>
<namespaces>
<namespace key="-2">Media</namespace>
<namespace key="-1">Special</namespace>
<namespace key="0"/>
<namespace key="1">Talk</namespace>
<namespace key="2">User</namespace>
<namespace key="3">User talk</namespace>
<namespace key="4">Project</namespace>
<namespace key="5">Project talk</namespace>
<namespace key="6">File</namespace>
<namespace key="7">File talk</namespace>
<namespace key="8">MediaWiki</namespace>
<namespace key="9">MediaWiki talk</namespace>
<namespace key="10">Template</namespace>
<namespace key="11">Template talk</namespace>
<namespace key="12">Help</namespace>
<namespace key="13">Help talk</namespace>
<namespace key="14">Category</namespace>
<namespace key="15">Category talk</namespace>
<namespace key="100">Manual</namespace>
<namespace key="101">Manual talk</namespace>
<namespace key="102">Extension</namespace>
<namespace key="103">Extension talk</namespace>
</namespaces>
</siteinfo>
<page>
<title>MediaWiki</title>
<id>1</id>
<revision>
<id>65192</id>
<timestamp>2007-01-24T19:51:53Z</timestamp>
<contributor>
<username>Brion VIBBER</username>
<id>79</id>
</contributor>
<minor/>
<comment>
Protected "[[MediaWiki]]": add cascade [edit=sysop:move=sysop]
</comment>
<text xml:space="preserve">
{{Main page}}
<!-- to edit this page, please see [[Project:Main page templates]] -->
</text>
</revision>
</page>
</mediawiki>

Source : MediaWiki Page

What is available :

  • Namespaces.
  • Contains complete text of every revision of every page. 
  • Contributor details with comments on the revision.

Whats Not :

  • Information on Links.
  • Image metadata not available.
  • User Data
  • Deleted Page Content
  • MultiLanguage Support.

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [gsoc:Import Export other wikis.MediaWiki Features]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

Directly from Database

We can directly connect to the database. And create a full import of  Wiki. In this case we have access to all the data.

Whats Available :

  • Access to complete page content with all revisions.
  • User Data
  • Links.
  • MultiLanguage Support.
  • Archived and Deleted Page Content.

Whats Not:

  • Database has metadata information of files only. So the user should supply the details of File Resources folder before we map them to XWiki Attachments.
     (includes Images and other file types. )

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [gsoc:Import Export other wikis.MediaWiki Features]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.