summaryrefslogtreecommitdiff
path: root/wiki_graph.php
diff options
context:
space:
mode:
authorbitweaver.org <bitweaver@users.sourceforge.net>2005-06-19 06:12:45 +0000
committerbitweaver.org <bitweaver@users.sourceforge.net>2005-06-19 06:12:45 +0000
commit850713ed26ff34d8fe37feed30bb94de4adc957c (patch)
tree7ceb5eaad8a84eb8796fd2d53ed62f17052acc35 /wiki_graph.php
downloadwiki-850713ed26ff34d8fe37feed30bb94de4adc957c.tar.gz
wiki-850713ed26ff34d8fe37feed30bb94de4adc957c.tar.bz2
wiki-850713ed26ff34d8fe37feed30bb94de4adc957c.zip
IMPORT TikiPro CLYDE FINAL
Diffstat (limited to 'wiki_graph.php')
-rw-r--r--wiki_graph.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/wiki_graph.php b/wiki_graph.php
new file mode 100644
index 0000000..65e7b59
--- /dev/null
+++ b/wiki_graph.php
@@ -0,0 +1,51 @@
+<?php
+// $Header: /cvsroot/bitweaver/_bit_wiki/wiki_graph.php,v 1.1 2005/06/19 06:12:45 bitweaver Exp $
+// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
+// All Rights Reserved. See copyright.txt for details and a complete list of authors.
+// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
+include_once( '../bit_setup_inc.php' );
+include_once( UTIL_PKG_PATH.'GraphViz.php' );
+include_once( WIKI_PKG_PATH.'BitPage.php');
+if(!isset($_REQUEST['level'])) $_REQUEST['level'] = 0;
+if(!isset($_REQUEST['nodesep'])) $_REQUEST['nodesep'] = ".1";
+if(!isset($_REQUEST['rankdir'])) $_REQUEST['rankdir'] = "LR";
+if(!isset($_REQUEST['bgcolor'])) $_REQUEST['bgcolor'] = "transparent"; # general background color #rrvvbb or 'transparent'
+if(!isset($_REQUEST['size'])) $_REQUEST['size'] = ""; # "x,y" in inches
+if(!isset($_REQUEST['fontsize'])) $_REQUEST['fontsize'] = "9";
+if(!isset($_REQUEST['fontname'])) $_REQUEST['fontname'] = "Helvetica";
+if(!isset($_REQUEST['shape'])) $_REQUEST['shape'] = "box"; # plaintext ellipse circle egg triangle box diamond trapezium parallelogram house hexagon octagon
+if(!isset($_REQUEST['nodestyle'])) $_REQUEST['nodestyle'] = "filled";
+if(!isset($_REQUEST['nodecolor'])) $_REQUEST['nodecolor'] = "#aeaeae";
+if(!isset($_REQUEST['nodefillcolor'])) $_REQUEST['nodefillcolor'] = "#FFFFFF";
+if(!isset($_REQUEST['nodewidth'])) $_REQUEST['nodewidth'] = ".1";
+if(!isset($_REQUEST['nodeheight'])) $_REQUEST['nodeheight'] = ".1";
+if(!isset($_REQUEST['edgecolor'])) $_REQUEST['edgecolor'] = "#999999";
+if(!isset($_REQUEST['edgestyle'])) $_REQUEST['edgestyle'] = "solid";
+$garg = array(
+ 'att' => array(
+ 'level' => $_REQUEST['level'],
+ 'nodesep' => $_REQUEST['nodesep'],
+ 'rankdir' => $_REQUEST['rankdir'],
+ 'bgcolor' => $_REQUEST['bgcolor'],
+ 'size' => $_REQUEST['size']
+ ),
+ 'node' => array(
+ 'fontsize' => $_REQUEST['fontsize'],
+ 'fontname' => $_REQUEST['fontname'],
+ 'shape' => $_REQUEST['shape'],
+ 'style' => $_REQUEST['nodestyle'],
+ 'color' => $_REQUEST['nodecolor'],
+ 'fillcolor' => $_REQUEST['nodefillcolor'],
+ 'width' => $_REQUEST['nodewidth'],
+ 'height' => $_REQUEST['nodeheight']
+ ),
+ 'edge' => array(
+ 'color' => $_REQUEST['edgecolor'],
+ 'style' => $_REQUEST['edgestyle']
+ )
+);
+$str = $wikilib->wiki_get_link_structure($_REQUEST['page'], $_REQUEST['level']);
+$graph = new Image_GraphViz();
+$wikilib->wiki_page_graph($str, $graph, $garg);
+$graph->image();
+?>