Extension:FLAscheme

What does this extension do?
This extension allows you to add a scheme viewer and WYSIWYG editor written in Flash to a wiki page.

Usage
] [width= ] [height= ]>

You may set an attribute id if you have many schemes on one page. This attribute can help to resolve conflicts if during an editing of a scheme in a page another user adds a new scheme on the same page above the former scheme.

The attributes width and height have a common usage.

After a saving the content of a scheme an appropriative XML description will be put in the content of the corresponding flascheme tag. You can also edit this content using the default MediaWiki text editor. However, the used XML format is not purposed for making changes by a hand.

You can copy a scheme by copying the corresponding tag with its content to an appropriative place. If you paste copied scheme to the same page you may change an attribute id of the tag to prevent conflicts.

User Permissions
The button edit in Flascheme applet is showen only if a user have the edit right of the viewed page. Check Technical Details and Security sections for an extended description of the extension's security system.

Page History
If you view an old revision you will be showen the scheme with the revision content. You cannot use the WYSIWYG editor to edit an old revision.

Security
At this moment it is necessary to send MediaWiki user's cookies to the flash applet. This requirement will be abandoned when the MediaWiki developer's team makes external API to work without cookies.

All the edit operations in the extension are done through MediaWiki external API. The MediaWiki function Parser::extractTagsAndParams is used to parse the flascheme tag.

As one can see, the extension does not seem to add new holes to the MediaWiki security system.

Installation
 Register on the flascheme site. Download and unzip the directory Flascheme to the extensions directory of the installed MediaWiki. Add to the following code: require_once("$IP/extensions/Flascheme/Flascheme.php"); $wgFlaschemeLicenseKey = '';  Get the license key for the flascheme.swf applet. In many cases it is free. Put the key to $wgFlaschemeLicenseKey.  You can also set $wgFlaschemeWidth or $wgFlaschemeHeight to set the corresponding default size parameters of extension's schemes.

Technical Details
The extension consists of three parts:
 * 1) Tag parser for flascheme
 * 2) Special page FlaschemeGet
 * 3) Special page FlaschemeSet

The tag parser part replaces flascheme tag with HTML embed tag. The resulting embed tag includes the following information.
 * Localisation. Only English and Russian are supported now.
 * The addresses of FlaschemeGet and FlaschemeSet special pages.
 * The page title
 * An unique identifier of the scheme in the page. It consists of the user id and the number of the preceding schemes with the same user id on the same page.
 * The revision number.
 * One bit describing the possibility of user's editing the current viewing page. It is set to one if Title::quickUserCan('edit') returns one and the most recent revision is being viewed.
 * MediaWiki API token. At this moment this information is of no use because the applet however takes user's cookies.

The special pages give the applet an extended external interface to control the content of flascheme tags inside pages. See ApiMain.