Extension:RawPageTools

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
RawPageTools

Release status: stable

Implementation Tag
Description
Author(s) user:jldupont
Last version See SVN
MediaWiki tested on 1.10 but probably works with a earlier versions
License No license specified
Download SVN

Check usage (experimental)

Contents

[edit] 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.

[edit] 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

[edit] 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.

[edit] Dependencies

[edit] 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
                         );

[edit] See also

This extension is part of the BizzWiki platform.

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox