RawMsg Extension

From Jimbojw.com

Jump to: navigation, search

The RawMsg Extension is a MediaWiki extension which adds a parser function called #rawmsg for injecting raw HTML fragments into pages.

It is released under The MIT License.

Contents

Compatibility

This extension requires:

  • MediaWiki 1.6.x, 1.9.x, 1.10.x or higher
  • PHP 4.x, 5.x or higher

Installation

  1. Download RawMsg, and be sure to rename the downloaded file to RawMsg.php.
  2. Drop this script in $IP/extensions
    Note: $IP is your MediaWiki install dir.
  3. Enable the extension by adding this line to your LocalSettings.php:
    require_once('extensions/RawMsg.php');

Usage

Once installed, you (or editors of your wiki) may begin embedding any existing raw messages into any pages.

The parser extension expects to be called in the following way:

  • {{#rawmsg:message-name}}

Where:

  • message-name is the name of the message.

Example

For example, calling this:

{{#rawmsg:test-pattern}}

Would effectively grab the content of [[MediaWiki:rawmsg-test-pattern]] and inject it as raw HTML into the output.

Note: This output may still be subject to some mangling by the MediaWiki parser since whitespace and bullets can be interpreted as wikimarkup. See Raw HTML Output from a Parser Extension for more details.

Comments

Got something to say?

Leave a comment
Sorry, comments are disabled.

or, read what others have said ...