Open main menu

Extension:FLAscheme

MediaWiki extensions manual
OOjs UI icon advanced.svg
FLAScheme
Release status: stable
Implementation Tag , Special page
Description Interactive scheme editor
Author(s) Fuzzle team & Aleksey Tatuzov (AlekseyTatuzovtalk)
Latest version 1.0.2 (2010-08-02)
MediaWiki 1.15.4
PHP 5
License php code: BSD-3; flash applet: commercial
Download http://flascheme.com/Docs/ForMediawiki
Example http://mediawiki.flascheme.com/wiki
wgFlaschemeLicenseKey, wgFlaschemeLocale, wgFlaschemeWidth, wgFlaschemeHeight
flascheme
Translate the FLAscheme extension if it is available at translatewiki.net
Check usage and version matrix.

Contents

What does this extension do?Edit

This extension allows you to add a scheme viewer and WYSIWYG editor written in Flash to a wiki page.

UsageEdit

<flascheme [id=<id>] [width=<width>] [height=<height>]></flascheme>

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 PermissionsEdit

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 HistoryEdit

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.

SecurityEdit

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.

InstallationEdit

  1. Register on the flascheme site.
  2. Download and unzip the directory Flascheme to the extensions directory of the installed MediaWiki.
  3. Add to LocalSettings.php the following code:
    require_once("$IP/extensions/Flascheme/Flascheme.php");
    $wgFlaschemeLicenseKey = '';
    
  4. 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 DetailsEdit

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().