Mediawiki SvGViz extension

The educational technology and digital learning wiki
Jump to navigation Jump to search



SvGViz was a mediawiki extension to visualize the neighbor links (pages, categories and authors) of a mediawiki page with SVG. Currently it is not working in this wiki (it would need upgrading and some code optimization) - 02:04, 21 July 2015 (CEST).

Have a look the toolbox to your left and click on "Visualize this article with SVG". This menu item is available for all regular wiki pages.

See also: SemanticWiki. This visualization developed by Urs Richle is more powerful, but needs Java, time to load and data file loaded by the applet can be huge, e.g. 5MB for this little wiki :). Hint: set "locality" to 2 right after loading. Since I wrote most of the pages and my contributions expand, you get hundreds of links on a page with three neighbours ...


Compatible browsers

It has been tested with :

  • Firefox (not too old versions) on Win, Mac (?) and Linux
  • With IE 6/7 on Windows using the Adobe SVG plugin. Note: You may have trouble installing this plugin on IE 7, if you do, you may try Renesis (but 0.7 beta only gives you some of the SVG contents ... - 12:28, 6 July 2007 (MEST)).
  • With Opera 9.2x on Windows

Mediawiki versions and requirements

  • SvGViz runs with Mediawiki 1.10, but should also run with 1.8 and 1.9 (it will not run with older versions since SvGViz relies on a given database architecture for links extraction).
  • SvGViz also relies on the MonoBook Skin/Theme (the one you see here). It is needed to insert the menu item into the toolbox menu and uses a theme-specific hook. Else you have to hack the skins files or make chances to the source code.
  • PhP 5.x

Source and status


This is unsupported beta software.

Romain Sauvain did this project for one of my classes. The links extractor has been developed by Urs Richle for an earlier project, the Special:SemanticWiki JavaViz (SemanticWiki) extension .

The future of this extension is not clear for now - Daniel K. Schneider 20:00, 27 June 2007 (MEST). But it's a GPL license ... so if you make signification contributions and redistribute another copy somewhere (e.g. on Mediawiki), please let us know.


(last update: Sept 2007, next will probably be sometimes next fall).

Open issues

Missing features
  • Toolbox link will not display in category pages
  • Node type of the central node is not clear
  • Can't find links to categories (only display categories of page)
  • Forwarded pages (how can we deal with them and should we ?)

Fixed problems

Version July 5 2007. Urs fixed these (you can try it in our French edutech wiki):

  • This extension didn't not work if you use a database prefix. This was forgotten when the links extractor was written :( This can be fixed, but we don't have time for it right now ... Probably all files in SvgViz/includes/classes need to be changed.
e.g. $wgDBprefix = "mw_"; will fail
$wgDBprefix = ""; will work
  • Links didn't not work if you have articles with accents.

Version Sept 2007:

  • On a page with images, firstly "display external links", then click on one of the image file link and you get
"Fatal error: Cannot use object of type Link as array in
/data/portails/mediawiki/extensions/SvgViz/wikiprojet.php on line 510"


Here is copy of the readme file (actually, this should become the readme file in some future release)

WikiViz: Installation guide

| SVGViz, a MediaWiki(1.9.3) extension                                 |
| Copyright (C) 2007  Romain Sauvain                                   |
| This program is free software; you can redistribute it and/or
| modify it under the terms of the GNU General Public License
| as published by the Free Software Foundation; either version 2
| of the License, or (at your option) any later version.
| This program is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| GNU General Public License for more details.
| You should have received a copy of the GNU General Public License
| along with this program; if not, write to the Free Software
| Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
| MA  02110-1301, USA.
| Author: Romain Sauvain <>                   |
SVGViz is an extension for the MediaWiki platforme. (
SVGViz creates a specific visualization of the MediaWiki semantic content diplayed with SVG

ATTENTION: SVGViz requires PHP 5!


1) download SVGViz zip, unpack and put the SVGViz package into the
   directory "extensions". Do not change the name of the directories
   or files.

2) put the follwing lines into the file "LocalSettings.php" (just after
   "require_once ("includes/DefaultSettings.php")" or at the end of
   the script)

# SvgViz Extension

3) Set the permissions of the "tempfiles" directory to "world-write", so
   that Php can create temporary files in this directory. Alternatively,
   and better, chown this directory to the owner of the httpd processes.


4) Open the file "define.php" in the directory "includes" of SVGViz
   (go to "SVGViz" directory and find "includes" directory there).

5) Define your default selected Node name: open the script
   "define.php" in the directory "includes" - define the global
   variable "$initialNodeName" with your default Node-name.


6) Go to specialpages on MediaWiki. You will find "SVGViz" in the
   list. You should also have link called "Visualise this article" in
   your left menu.

IF SOMETHING GOES WRONG (added by DKS / June 26)

There may be a problem with wikiproject.php, i.e. definition of file
and URL pathes (look at the beginning and the end of the file).

At TECFA we have the following setup (file LocalSettings.php):

$wgScriptPath	    = "/mediawiki";
$wgScript           = "$wgScriptPath/index.php";
$wgRedirectScript   = "$wgScriptPath/redirect.php";

# DKS 3/2006
$wgArticlePath      = "/en/$1";

$wgStylePath        = "$wgScriptPath/skins";
$wgStyleDirectory   = "$IP/skins";
$wgLogo             = "$wgStylePath/monobook/tecfa/wiki.png";

$wgUploadPath       = "$wgScriptPath/images";
$wgUploadDirectory  = "$IP/images";

Apache httpd.conf looks like this:

Alias /mediawiki "/data/portails/mediawiki"
Alias /en "/data/portails/mediawiki/index.php"
Alias /en/index.php "/data/portails/mediawiki/index.php"