Extension:Dia

The Dia extension that allows Dia diagrams to be embedded/rendered inside MediaWiki pages.

Installing
Copy the Dia directory into the extensions folder of your MediaWiki installation. Then add the following lines to your LocalSettings.php file (near the end):

To finish the installation, you must make sure the dia mime types are known to WikiMedia. This can be done by applying the supplied patch mimetypes.patch

Or by manually adding the following line to includes/mime.types:

And by adding the following line to includes/mime.info:

Configuration

 * $wgDIANominalSize: The nominal width of a Dia file when rendered to png (default: 300px).


 * $wgDIAMaxSize: Don't scale a Dia file larger than this (default: 1024px).

Advanced Configuration
Dia diagrams may be uploaded as drawings. these diagrams are converted to png before they can be rendered on a page. An external program is required to perform this conversion. By default 'dia' itself is used to perform this conversion, but if you have a different tool to perform the conversion you can set it up here.


 * $wgDIAConverters: An associative array linking your conversion tool (as key) with the commandline to be used for your tool. In this commandline you can use the following variables:
 * $input: The input filename
 * $output: The output filename
 * $width: The output width
 * $wgDIAConverter: The currently selected converter (default: 'dia').
 * $wgDIAConverterPath: If the currently selected converter is not in the default PATH environment variable, you can set the path here.

Note: Future versions of the extension may also output SVG.

Client Side
This extension works great when using an external editor.

In addition to this, a patch has been posted on bugzilla that updates the ee (external editor) "extension" to allow a connection to a wiki page that is protected with HTTP authentication (i.e. logins that give a popup username/password requester).

History

 * 20071031 Initial version.