Extension:AnyWikiDraw
| The author of this extension is no longer maintaining it! Meaning any reports for additional features and/or bugfixes will more than likely be ignored. Volunteers are encouraged to take on the task of developing and maintaining it. As a courtesy, you may want to contact the author. You should also remove this template and list yourself as maintaining the extension in the page's {{extension}} infobox. |
|
AnyWikiDraw drawing editor Release status: experimental |
|
|---|---|
| Implementation | Parser function, Page action |
| Description | Allows to edit SVG, PNG and JPEG images directly in a page using a Java applet. |
| Author(s) | Werner Randelshofer (Rawcodertalk) |
| Last version | 0.17 (2010-05-27) |
| MediaWiki | 1.7 – 1.15 only |
| License | Client-side code: Creative Commons Attribution 3.0 and/or LGPL, Server-side code: GPL |
| Download | http://sourceforge.net/projects/anywikidraw |
| Check usage and version matrix | |
The AnyWikiDraw extensions adds a {{#drawing:}} tag to the MediaWiki parser which allows to edit SVG, PNG and JPEG images directly in a page using a Java applet.
This extension is also available for MoinMoin, PmWiki, TWiki, and Foswiki.
Contents |
Usage [edit]
The tag has the following form
{{#writing:image.svg|width|height}}
- The tag needs to be put into two curly braces.
- The name of the tag is
#drawing: - The parameter
image.svgspecifies the name of the image file. If you specify an image file that does not yet exist in your Wiki, the image is created the first time you save a drawing. - The image name may have one of the following extensions: svg, png, jpg.
- The parameter
widthspecifies the width of the image - The parameter
heightspecifies the height of the image
To draw the image HappyWiki.svg with a width of 400 pixels and a height of 300 pixels on a page, insert the following tag:
{{#drawing:HappyWiki.svg|400|300}}
Installation [edit]
Security considerations [edit]
Before installing this extension, please consider whether you want to do the following configuration changes on your MediaWiki installation:
- You must grant access to session cookies to JavaScript and Java.
You may not want to do this if your wiki embeds JavaScript code from untrusted sources.
For example if your wiki embeds banners and advertisements from a third party system.
- You need to allow file upload.
You may not want to do this if your wiki allows user account creation by people you do not know.
Installation steps [edit]
- Make sure the StringFunctions and ParserFunctions extensions are installed.
- Enable cookie access for JavaScript and Java Applets in the LocalSettings.php file.
- Enable file upload in the LocalSettings.php file.
- Optional: Install an SVG converter in your MediaWiki installation, for example ImageMagick, and enable it in the LocalSettings.php file.
You can omit this step, if you only want to edit PNG and JPEG images. - Copy the AnyWikiDraw folder into the
extensionsfolder of your MediaWiki installation. - Enable AnyWikiDraw in the LocalSettings.php file.
Changes to LocalSettings.php [edit]
// Enable cookie access for JavaScript and Java Applets
$wgCookieHttpOnly = false;
// Enable file upload
$wgEnableUploads = true;
// Enable an SVG converter, for example ImageMagick
$wgUseImageMagick = true;
$wgImageMagickConvertCommand='/opt/local/bin/convert';
$wgSVGConverterPath='/opt/local/bin';
$wgFileExtensions[] = 'svg';
// Enable AnyWikiDraw
require_once("$IP/extensions/AnyWikiDraw/AnyWikiDraw.php");
To Do [edit]
This extension is in experimental state, because its functionality is incomplete, and because there are some known issues:
Missing functionality [edit]
- Support for the ODG file format is missing. ODG is the Open Document Drawing format used by Open Office, Neo Office and other open source office programs.
- Support for the TWikiDraw and PmWikiDraw file formats is missing.
- SVG Color gradients are displayed but can not be edited.
- SVG Markers are not yet supported.
- The offline version of AnyWikiDraw is missing.
Known issues [edit]
- Saves silently fail when editing an image without being logged into the wiki.
- AnyWikiDraw only works with the specified MediaWiki versions.
- Browsers don't refresh images after they are saved. We need either find a way to clear the image cache of the browser, or to deliver images without letting the browser cache them.
- Pages which use the drawing tag are not listed as linking to the image file.
- It is not clear, how we can add support for image formats like ODG .odg, TWikiDraw .draw and PmWikiDraw .draw to MediaWiki.
Links [edit]
A demo of the drawing applet can be tried out at http://www.randelshofer.ch/anywikidraw/demo/anywikidraw_for_twiki_demo.html