User:Mlong212

All extensions have been installed on:
 * Product ||  Version
 * MediaWiki  ||   1.12.0
 * PHP  ||   5.2.5 (cgi-fcgi)
 * MySQL  ||   5.0.24-community-nt
 * OS  ||   Windoes Server 2003

Graphviz
Main page: Extension:GraphViz

Required: Graphviz webpage or direct file link
 * version 2.18

Some Windows operating systems may require run-time components of Visual C++ libraries to properly run Graphviz executables. click this link and install Microsoft Visual C++ 2005 Redistributable Package (x86).

Install directions
1.) install graphviz software I installed it to w:\graphviz2.18
 * this path is referenced in the graphviz.php and needs to be changed to your install path

2.) add user rights
 * use file browser and find cmd.exe and give internet users read/execute access
 * give internet users read/execute access to the directory graphviz was installed to

3.) create Graphviz.php
 * save into your mediawiki/extensions folder
 * edit about line 12 ( $wgGraphVizSettings->dotCommand = "w:\\graphviz2.18\\bin\\dot.exe"; ) to reflect your graphviz software installation
 * note the two "\\" between directories

dotCommand = "w:\\graphviz2.18\\bin\\dot.exe";

$wgExtensionFunctions[] = "wfGraphVizExtension";

function wfGraphVizExtension { global $wgParser; $wgParser->setHook( "graphviz", "renderGraphviz" ); #renderGraphviz (5); }

function renderGraphviz( $timelinesrc ) {	global $wgUploadDirectory, $wgUploadPath, $IP, $wgGraphVizSettings, $wgArticlePath, $wgTmpDirectory; $hash = md5( $timelinesrc ); $dest = $wgUploadDirectory."\\graphviz\\"; if ( ! is_dir( $dest ) ) { mkdir( $dest, 0777 ); } if ( ! is_dir( $wgTmpDirectory ) ) { mkdir( $wgTmpDirectory, 0777 ); }

$fname = $dest. $hash; //	echo $fname; if ( ! ( file_exists( $fname.".png" ) || file_exists( $fname.".err" ) ) ) {		$handle = fopen($fname, "w"); fwrite($handle, $timelinesrc); fclose($handle);

$cmdline = wfEscapeShellArg( $wgGraphVizSettings->dotCommand). " -Tpng -o ". wfEscapeShellArg( $fname. ".png"). " " .		 wfEscapeShellArg( $fname ) ;

$cmdlinemap = wfEscapeShellArg( $wgGraphVizSettings->dotCommand). " -Tcmapx -o ". wfEscapeShellArg( $fname. ".map"). " " .		 wfEscapeShellArg( $fname ) ; //		echo $cmdline; //		exit; //		break; //		echo "ADIOS"; $ret = `"{$cmdline}"`; $ret = `"{$cmdlinemap}"`;

unlink($fname);

/* if ( $ret == "" ) { // Message not localized, only relevant during install return "Timeline error: Executable not found. Command line was: {$cmdline} "; }	}

@$err=file_get_contents( $fname.".err" );

if ( $err != "" ) { $txt = "$err "; } else { //echo $fname.".map"; @$map = file_get_contents( $fname.".map" ); //echo "mapa-antes:".$map; $map=preg_replace("##"," ",$map); $map=str_replace(" ","",$map);

//echo "mapa:".$map; if (substr(php_uname, 0, 7) == "Fucker") { $ext = "gif"; } else { $ext = "png"; }

$txt = "{$map} ". ""; }	return $txt; }

?>

4.) edit mediawiki localsettings.php
 * add the following 2 lines:
 * include("extensions/Graphviz.php");
 * $wgGraphVizSettings->dotCommand = "W:\\Graphviz2.18\\bin\\DOT.exe";


 * change the dotcommand path to reflect your graphviz software installation
 * note the two "\\" between directory names

Graph with links assigned to each
use node [URL="http://10.0.0.3//index.php?title=\N"];

where " title=\ " =  " title=namespace\ "

where " \N" " will become the page title and is derived from the chart values



digraph G { node [style=filled, color=black, fillcolor=ghostwhite]; bgcolor="transparent"; node [URL="http://www.mediawiki.org/w/index.php?title=User:Mlong212/\N"]; size ="8,8"; Top[shape=box, style=filled, fillcolor=lightblue]; Bottom [style=filled, fillcolor=lightblue]; Top -> Branch1; Top -> Branch2; Top -> Branch3]; Branch1 -> sub1; Branch2 -> Bottom; sub3 -> "almost there"; Branch3 -> sub3; sub1 -> Bottom; "almost there" -> Bottom; }
 * }

Inkscape
Main page:

Required: [ webpage] or [ direct file link]
 * version