Advertising sustains the DA. Ads are hidden for members. Join today

mediawiki_filter

The mediawiki_filter module provides an input format, compatible with MediaWiki markup. This allows you to use Wikitags (aka Wiki markup or Wiktext) as known from Wikipedia and other Wikimedia projects, plus a number of other featuresw. Wikitags are easier to use and memorize than HTML, faster to type and help to prevent malicious users from disrupting your site's formatting.

Opposed to older approaches, mediawiki_filter does not emulate the MediaWiki parser, but wraps the original MediaWiki's library for parsing and rendering MediaWiki syntax. This results in a high degree of compatbility with the markup used in Wikipedia articles and other sites running the MediaWiki software.

mediawiki_filter supports most of the markup listed on http://www.mediawiki.org/wiki/Help:Formatting and http://www.mediawiki.org/wiki/Help:Tables; also, to some degree image embedding is supported out of the box as well. A primer is available at Wikipedia: How to edit a page.

Specific to Drupal, the following markup can be used:

[[page]] links to the page with the page with the title "page". Very easy, but breaks if the page title changes.

[[path:node/nid|any title]] links to the Node ID (nid) and thusly uses a permalink which only breaks if the hyperlinked node is deleted.

[[path:any/path|any title]] links to any Drupal path and handles the link as an internal hyperlink.

[http://example.com external site] linkts to the external site http://example.com with the title "external site". The external link is marked with an icon.

If you use Interwiki links, you can map paths to any external site with structured URLs with shortcuts. Interwiki links are not marked with the icon for external links.

Examples for Interwiki link mappings:

  Local path | path | <path>
  Wikipedia | wp | http://en.wikipedia.org/wiki/$1
  Drupal.org  | do | http://drupal.org/node/$1

Credits for mediawiki_filter and the MediaWiki software

mediawiki_filter was initially created for Origo. The original authors of the Drupal module were rötzi and bherlig.

Formatting with mediawiki_filter

Formatting

Installation of mediawiki_filter

Installation

Guide maintainers

asb's picture