2 // PukiWiki - Yet another WikiWikiWeb clone.
3 // $Id: touchgraph.inc.php,v 1.10 2005/12/18 15:28:55 henoheno Exp $
5 // Output an index for 'TouchGraph WikiBrowser'
6 // http://www.touchgraph.com/
8 // Usage: (Check also TGWikiBrowser's sample)
9 // java -Dfile.encoding=EUC-JP \
10 // -cp TGWikiBrowser.jar;BrowserLauncher.jar com.touchgraph.wikibrowser.TGWikiBrowser \
11 // http://<pukiwiki site>/index.php?plugin=touchgraph \
12 // http://<pukiwiki site>/index.php? FrontPage 2 true
14 // Note: -Dfile.encoding=EUC-JP (or UTF-8) may not work with Windows OS
15 // http://www.simeji.com/wiki/pukiwiki.php?Java%A4%CE%CD%AB%DD%B5 (in Japanese)
18 function plugin_touchgraph_action()
23 header('Content-type: text/plain');
24 if (isset($vars['reverse'])) {
25 plugin_touchgraph_ref();
27 plugin_touchgraph_rel();
33 function plugin_touchgraph_rel()
35 foreach (get_existpages() as $page) {
36 if (check_non_list($page)) continue;
38 $file = CACHE_DIR . encode($page) . '.rel';
39 if (file_exists($file)) {
42 foreach(explode("\t", trim($data[0])) as $name) {
43 if (check_non_list($name)) continue;
52 function plugin_touchgraph_ref()
54 foreach (get_existpages() as $page) {
55 if (check_non_list($page)) continue;
57 $file = CACHE_DIR . encode($page) . '.ref';
58 if (file_exists($file)) {
60 foreach (file($file) as $line) {
61 list($name) = explode("\t", $line);
62 if (check_non_list($name)) continue;