User:Hummel-riegel/GraphViz

This page is under construction Attention: This Extension is currently work in progress - The code may be functional but I don't give any guarantees Please visit the Extensions Extension:Graphviz oder Extension:GraphVizAndMSCGen for the actual code that I want to improve here.

Feel free to add your own stuff or to modifiy this page!

= Extension:GraphViz =

Automatic graph drawing has many important applications in software engineering, database and web design, networking, and in visual interfaces for many other domains.

Contributions
In 2004 the User Coffman created an extension to mediawiki in response to a basic need : Render Graphs online. He found the utility Graphviz on another wiki, and thought about adopting it to mediawiki (the wiki he actually used). Exploring the Graphviz tool he discovered an incredible tool to making Graphs. Later on many people improved the extension on their own or provided little bugfixes as snippets on the dicussion page. This led to several functional solutions for different use cases and to a bit of chaos. Now (Fall 2010) I (Thomas Hummel) will try to merge the most common solutions so that we finally have another working solution for several OSes in one file. As I am not that well known to PHP there might be several long-winded or impractical lines in the code - so feel free to send me your improvements or comments (Discussion-Page, Message or whatever). I started with the "improved version" from an unknown Coder and tried to fix some things on my own and then include parts of the code of other "improvements". Good sources were for example Extension:GraphVizAndMSCGen by Matthewpearson.

Alternatives
If you don't like this extension there are some others that I find remarkable (although I tried to put the main functionality of all of them into this extenstion).
 * I don't know how good this acutally works but it seems well coded

GraphViz

 * 1) First of all you need at least one of the external tools "GraphViz" or "MSCGen" that renders your Graph.
 * 2) Then Copy the Code found here User:hummel-riegel/GraphViz/GraphViz.php into a file called GraphViz.php and and place it in  .  Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.
 * 3) Make sure that write permissions for the "$IP/images" directory are granted.
 * 4) Add these lines to LocalSettings.php:
 * Windows Default: C:/Programme/ATT/Graphviz/bin/ (without dot.exe)
 * Other Platform : /usr/local/bin/ (where the dot folder is)

MSCGen
The same procedure as with GraphViz - only the path to MSCGen has to be provided.

-tbd - til its done please use the instructions here: Extension:GraphVizAndMSCGen

Differences to previous versions
The varable $dotCommand that points only to the dot executable is replaced (like in GraphVizAndMSCGen) with $execPath that lets you choose between several renderers.

Code
User:hummel-riegel/GraphViz.php

Projects based on this extenstion

 * The "Semantic Result Formats"-Extension is used in conjunction with the Semantic MediaWiki extension, that bundles a number of further result formats for SMW's inline queries.
 * Extension:Semantic Result Formats/graph_format (displays connections between pages (as graph)
 * Extension:Semantic Result Formats/process_format (displays process graphs)