# Netlogo Publication Script # # # (c) 2004 Steven Brewer; Biology Computer Resource Center # Free Software under the Creative Commons Attribution License: #
# Set the title, which should match the file name of the this file as well # as the nlogo and html files all in the same directory
$title="lac_operon";
# If you want to have the simulation load when you visit a directory URL, # add "index.php" to the DirectoryIndex directive in httpd.conf and then # create a symbolic link to this file from index.php, e.g. # ln -s lac_operon.php index.php
# You may need to adjust where the file looks for the netlogoLite.jar files
# this routine parses the html file, grabbing the line with the # dimensions of the applet and truncating the top; $fp = fopen ("${title}.html", "r"); $line=0; while (!feof ($fp)) { $buffer = fgets($fp, 4096); if(preg_match("/^\s+width=.*/",$buffer,$matches)) { $width = $buffer; } if($line>58) { $rest .= $buffer; } $line++; }
?>
echo $title; ?>
echo $title; ?>
echo $title; ?>.php">Use Netlogo 1.3:
# We present a form that let's people select which Netlogo engine to use if ($old) { echo "\n"; } else { echo "\n"; } ?>