wiki
[ class tree: wiki ] [ index: wiki ] [ all elements ]

Source for file wiki_graph.php

Documentation is available at wiki_graph.php

  1. <?php
  2. /**
  3.  * $Header: /cvsroot/bitweaver/_bit_wiki/wiki_graph.php,v 1.3 2006/03/20 15:58:38 squareing Exp $
  4.  *
  5.  * Copyright (c) 2004 bitweaver.org
  6.  * Copyright (c) 2003 tikwiki.org
  7.  * Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
  8.  * All Rights Reserved. See copyright.txt for details and a complete list of authors.
  9.  * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
  10.  *
  11.  * $Id: wiki_graph.php,v 1.3 2006/03/20 15:58:38 squareing Exp $
  12.  * @package wiki
  13.  * @subpackage functions
  14.  */
  15.  
  16. /**
  17.  * required setup
  18.  */
  19. include_once'../bit_setup_inc.php' );
  20. include_onceUTIL_PKG_PATH.'GraphViz.php' );
  21. include_onceWIKI_PKG_PATH.'BitPage.php');
  22. if(!isset($_REQUEST['level'])) $_REQUEST['level'0;
  23. if(!isset($_REQUEST['nodesep'])) $_REQUEST['nodesep'".1";
  24. if(!isset($_REQUEST['rankdir'])) $_REQUEST['rankdir'"LR";
  25. if(!isset($_REQUEST['bgcolor'])) $_REQUEST['bgcolor'"transparent";   # general background color #rrvvbb or 'transparent'
  26. if(!isset($_REQUEST['size'])) $_REQUEST['size'"";                    # "x,y" in inches
  27. if(!isset($_REQUEST['fontsize'])) $_REQUEST['fontsize'"9";
  28. if(!isset($_REQUEST['fontname'])) $_REQUEST['fontname'"Helvetica";
  29. if(!isset($_REQUEST['shape'])) $_REQUEST['shape'"box";            # plaintext ellipse circle egg triangle box diamond trapezium parallelogram house hexagon octagon
  30. if(!isset($_REQUEST['nodestyle'])) $_REQUEST['nodestyle'"filled";
  31. if(!isset($_REQUEST['nodecolor'])) $_REQUEST['nodecolor'"#aeaeae";
  32. if(!isset($_REQUEST['nodefillcolor'])) $_REQUEST['nodefillcolor'"#FFFFFF";
  33. if(!isset($_REQUEST['nodewidth'])) $_REQUEST['nodewidth'".1";
  34. if(!isset($_REQUEST['nodeheight'])) $_REQUEST['nodeheight'".1";
  35. if(!isset($_REQUEST['edgecolor'])) $_REQUEST['edgecolor'"#999999";
  36. if(!isset($_REQUEST['edgestyle'])) $_REQUEST['edgestyle'"solid";
  37. $garg array(
  38.     'att' => array(
  39.         'level' => $_REQUEST['level'],
  40.         'nodesep' => $_REQUEST['nodesep'],
  41.         'rankdir' => $_REQUEST['rankdir'],
  42.         'bgcolor' => $_REQUEST['bgcolor'],
  43.         'size' => $_REQUEST['size']
  44.     ),
  45.     'node' => array(
  46.         'fontsize' => $_REQUEST['fontsize'],
  47.         'fontname' => $_REQUEST['fontname'],
  48.         'shape' => $_REQUEST['shape'],
  49.         'style' => $_REQUEST['nodestyle'],
  50.         'color' => $_REQUEST['nodecolor'],
  51.         'fillcolor' => $_REQUEST['nodefillcolor'],
  52.         'width' => $_REQUEST['nodewidth'],
  53.         'height' => $_REQUEST['nodeheight']
  54.     ),
  55.     'edge' => array(
  56.         'color' => $_REQUEST['edgecolor'],
  57.         'style' => $_REQUEST['edgestyle']
  58.     )
  59. );
  60. $str $wikilib->wiki_get_link_structure($_REQUEST['page']$_REQUEST['level']);
  61. $graph new Image_GraphViz();
  62. $wikilib->wiki_page_graph($str$graph$garg);
  63. $graph->image'png' );
  64. ?>

Documentation generated on Thu, 15 Feb 2007 20:51:08 +0000 by phpDocumentor 1.3.0