Extension:RawPageTools
Appearance
RawPageTools Release status: stable |
|
---|---|
Implementation | Tag |
Author(s) | user:jldupont |
Latest version | See SVN |
MediaWiki | tested on 1.10 but probably works with a earlier versions |
License | No license specified |
Download | SVN |
Purpose
Removes 'js' and 'css' tag sections from a queried 'raw page'. This allows for documenting the page in normal page views using 'geshi' type extensions.
Features
- Allows documenting Javascript/CSS pages whilst still
- Preserving the ability to fetch the said page using 'action=raw'
- Handles <js> Javascript section
- Handles <css> CSS section
- Since only the extracted section is returned to the requesting browser, additional wikitext can be used on the page
- Improves documentation possibilities
Usage
As example, suppose one as an article page where some Javascript code is documented using a 'geshi' extension:
<js> // MediawikiClient.js // @author Jean-Lou Dupont // $Id: RawPageTools.php 469 2007-07-24 17:12:06Z jeanlou.dupont $ MediawikiClient = function() { // declare the custom event used to signal // status update re: document loading this.onDocStatusChange = new YAHOO.util.CustomEvent( "onDocStatusChange" ); ... </js>
A request could be sent for the page using 'action=raw&ctype=text/javascript' and the corresponding 'js' would be returned from the said page.
Dependancy
Installation
To install independantly from BizzWiki:
- Download 'StubManager' extension
- Apply the following changes to 'LocalSettings.php'
require('extensions/StubManager.php');
StubManager::createStub( 'RawPageTools',
$IP.'/extensions/RawPageTools/RawPageTools.php',
null,
array( 'RawPageViewBeforeOutput' ),
false
);
See also
This extension is part of the BizzWiki platform.