Ejemplo n.º 1
0
<?php

require_once "../config.php";
$config = array_merge($config, parse_ini_file("../../config.ini"));
require_once "../general.php";
require_once "general.php";
tagForGraphCheck($_GET["tag"], "tree");
$filename = href("data/tag/" . strtoupper($_GET['tag']) . "/graph/cluster");
?>
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <script src="<?php 
print $config["D3"];
?>
"></script>
    <script src="<?php 
print href("js/graphs.js");
?>
"></script>
    <script src="<?php 
print $config["jQuery"];
?>
"></script>
<?php 
print printMathJax();
?>
    <link rel='stylesheet' type='text/css' href='<?php 
print href("css/graphs.css");
?>
Ejemplo n.º 2
0
<?php

// TODO would it be interesting to have a special "section" view, in which the tags inside a section are immediate child nodes of the root node, thus making these graphs more interesting?
require_once "../config.php";
$config = array_merge($config, parse_ini_file("../../config.ini"));
require_once "../general.php";
require_once "general.php";
tagForGraphCheck($_GET["tag"], "force");
// TODO get a node count from the database
$filename = "../../data/" . strtoupper($_GET["tag"]) . "-force.json";
$filesize = filesize($filename);
$size = 900 + 10 * $filesize / 1000;
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <style>
      .link {
        stroke: #999;
        stroke-opacity: .6;
      }
      
      body {
        width: <?php 
print $size;
?>
px;
        height: <?php 
print $size;
?>