Extension:UnknownActionHandler

Description
MediaWiki pages have an  query parameter that is used to determine the "mode" of the page: e.g. view, edit, etc. (see Manual:Parameters to index.php for more information). In addition to the built-in values for the  query parameter, you can also define your own. This extension associates each custom action with a MediaWiki article that stores the php code to handle that action.

The processing code is fetched from a specified MediaWiki stored page. The said page can also contain GeSHi compatible tags to wrap the PHP code. Finally, wikitext can also be present on the page alongside the PHP code but this latter one will not take part in the Unknown Action handling.

Features

 * Secure
 * Composite Page capability: page which contains the 'handler' can also have the following contents:
 * PHP code (enclosed in tagged section)
 * Javascript code (enclosed in tagged section)
 * Wikitext (anywhere else on the page)

Security
This extension is secure: the page containing the PHP code can only be executed if the page is restricted on 'edit'. This functionality is provided by Extension:RunPHP Class.

Function
Extension that provides a new hook "UnknownAction".

This hook is triggered after a non-native action is requested to Mediawiki. A custom [Action][Handler] associative array is used to load a configured article page containing processing code to handle the request.

Example Usage
A special page for editing a page's attributes made available through the "PageAttributes" extension.

IMPORTANT USAGE NOTE
The MediaWiki page that stores the PHP code processor for the handler must be structured in the following way:

The extension leverages PHP's eval method capability to provide a return code in order to get access to the method name to call.

Dependencies
Requires the Extension:RunPHP Class to operate.

Installation
In :

History

 * V1.0   Initial availability.
 * V1.1   Integration with "RunPHP Class"
 * V1.2   Added Javascript integration
 * V1.3   Changed to "silent" behavior when no handler present for an action.