Coder Social home page Coder Social logo

dia's Introduction

Table of Contents

Dia extension for MediaWiki

  • Authors: (c) 2007 Marcel Toele (EleotleCram), (c) 2011+ Vitaliy Filippov
  • License: GNU General Public Licence (GPL) v2.0 or later
  • Description: Allows Dia diagrams to be rendered inside MediaWiki pages.
  • MediaWiki: 1.16+

Installation

  • Install Dia on your MediaWiki server.
  • Copy extension files to extensions/Dia directory of your MediaWiki installation.
  • Add the following line to your LocalSettings.php file:
require_once("$IP/extensions/Dia/Dia.php");
  • To handle gzipped dia files (they are also .dia), apply a patch to MediaWiki core. It will also enable gzipped SVG support (.svgz). Note the patch is only compatible with MediaWiki 1.21.
cd <installation_path>
patch -p1 < extensions/Dia/gzipped-xml-types-1.21.diff

Usage

After installation, Dia diagrams may be uploaded and used as normal images in your wiki (make sure you have $wgEnableUploads = true;), for example: [[File:Test.dia|500px]]. They are rendered as SVG+PNG pairs on pages; browsers that can't show SVG will fall back to PNG.

An external program (Dia itself by default) is required to perform this conversion.

Configuration

  • $wgDIAMaxSize: Don't scale a Dia file larger than this value in pixels (default: 1024).
The following usually shouldn't be changed at all:

$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
  • $type: Thumbnail type
$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.

History

  • 2014-01-16: Drop ancient MediaWiki (1.15 and below) support, do not force nominal diagram size.
  • 2011-07-27: SVG+PNG rendering, gzipped Dia support.
  • 2007-10-31: Initial version.

dia's People

Contributors

vitalif avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.