Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| dev:grapher-php [2020/10/10 19:18] – bab | dev:grapher-php [2020/11/01 15:59] (current) – bab | ||
|---|---|---|---|
| Line 256: | Line 256: | ||
| fwrite($fh, " | fwrite($fh, " | ||
| + | fwrite($fh, " | ||
| fwrite($fh, " | fwrite($fh, " | ||
| node [shape = \" | node [shape = \" | ||
| Line 262: | Line 263: | ||
| subgraph corporations { | subgraph corporations { | ||
| - | \" | + | \" |
| + | \" | ||
| \" | \" | ||
| \" | \" | ||
| Line 278: | Line 280: | ||
| \" | \" | ||
| \" | \" | ||
| - | \" | + | \" |
| } | } | ||
| Line 417: | Line 419: | ||
| $pages =& $data[' | $pages =& $data[' | ||
| $media =& $data[' | $media =& $data[' | ||
| - | $root_name = $data[' | + | $root_name = array_values($pages)[0][" |
| $output = '{ | $output = '{ | ||
| " | " | ||
| Line 431: | Line 434: | ||
| $output .= '" | $output .= '" | ||
| $output .= '" | $output .= '" | ||
| - | $output .= '" | + | $output .= '" |
| - | $output .= '" | + | |
| + | { | ||
| + | $path = explode (":", | ||
| + | $file = count($path ); | ||
| + | $folder=""; | ||
| + | for($n=0 ; $n < $file-1 ; $n++) | ||
| + | { | ||
| + | $folder = $folder . $path[$n] . "/"; | ||
| + | } | ||
| + | $output .= ',"img" : "'. DOKU_INC. " | ||
| + | } | ||
| // $output .= '" | // $output .= '" | ||
| // $output .= '" | // $output .= '" | ||
| $output .= " | $output .= " | ||
| - | if ($i < count($pages)) $output .= ','; | + | if ($i <= count($pages)-1) $output .= ','; |
| | | ||
| } | } | ||
| Line 451: | Line 464: | ||
| $output .= '{ | $output .= '{ | ||
| - | "from": "' | + | "source": "' |
| - | "to": "' | + | "target": "' |
| - | " | + | " |
| }'; | }'; | ||
| $cnt++; | $cnt++; | ||
| Line 459: | Line 472: | ||
| } | } | ||
| + | |||
| | | ||
| $output .= " ] }"; | $output .= " ] }"; | ||