User:Coffman/SVG Extension
From Meta, a Wikimedia project coordination wiki
This is an extension to Mediawiki which tries to renderize SVG graphics and put them onto the wiki. For the rendering process, the extension uses Batik from the Apache Project. There are a few examples at the top of this page ...
Contents |
[edit] Requisites
This project uses Batik from the Apache Project. Batik must be installed and functioning correctly before this extension can be used.
[edit] Download
- The extension is available from CVS at http://www.wickle.com .
- Alternate Download at SF.net : SF.net CVS
[edit] Install
To install, copy SVGExtension.php to the $mediawiki/extensions directory and add this line to LocalSettings.php:
include("extensions/SVGExtension.php");
Also, within SVGExtension.php, set the following variables as appropriate:
$wgSVGSettings->javaCommand = "/opt/java/j2sdk1.4.0/bin/java"; $wgSVGSettings->batikCommand = "/opt/java/batik-1.5.1/batik-rasterizer.jar";
to complete the installation.
[edit] Samples
There are a lot of samples at the author's wiki
[edit] An improved version
I tried your extension, and made a little improvement.
- give the link of svg, not only raw data;
- user can provide parameters to custom image size, etc.
See here: User:Jiangxin/Improved SVG Extension
-- Jiangxin 02:54, 16 November 2005 (UTC)