Extension:RawMsg
From MediaWiki.org
|
Release status: beta |
|
|---|---|
| Implementation | Parser function |
| Description | Adds a parser function called #rawmsg for inserting raw HTML fragments into wiki pages. |
| Author(s) | Jim R. Wilson (Jimbojw) |
| Last Version | 0.1 |
| MediaWiki | 1.6.x, 1.9.x, 1.10.x or higher |
| License | The MIT License |
| Download | RawMsg.php |
| Example | see the Project Homepage |
|
check usage (experimental) |
|
The RawMsg Extension is a MediaWiki extension which adds a parser function called #rawmsg for inserting bits of raw HTML into wiki pages.
- Project Homepage
- RawMsg Extension - Jimbojw.com
- Source Code
- RawMsg.php
- Licensing
- RawMsg is released under The MIT License.
[edit] Installation
- Download RawMsg, and be sure to rename the downloaded file to RawMsg.php.
- Drop this script in $IP/extensions
- Note: $IP is your MediaWiki install dir.
- Enable the extension by adding this line to your LocalSettings.php:
require_once('extensions/RawMsg.php');
[edit] Usage
The RawMsg parser function expects to be called in the following way:
{{#rawmsg:message-name}}
Where message-name is the name of raw HTML message to insert.
For example, calling {{#rawmsg:test-pattern}} would grab the content of [[MediaWiki:rawmsg-test-pattern]] and insert the content directly into the page.
The MediaWiki namespace was chosen to house the HTML fragments so that only Sysops may edit them due to the XSS risk. Also, the messages must begin with 'rawmsg-' to decrease the likelihood that an obscure accidental MediaWiki article could be used as an XSS attack vector.