$array) { if ($dp = opendir($dirBasics.$cat)) { while ($fp = readdir($dp)) { if (substr($fp, 0, 1) != '.') { $ex = new Example($fp, "Basics/".$cat, $subdir); if (!$local) { $ex->output_file($catBasics); } else { $ex->output_file($catBasics, "../../"); } $count++; } } } } //Create Topics files $count = 0; foreach ($catTopics as $cat => $array) { if ($dp = opendir($dirTopics.$cat)) { while ($fp = readdir($dp)) { if (substr($fp, 0, 1) != '.') { $ex = new Example($fp, "Topics/".$cat, $subdir); if (!$local) { $ex->output_file($catTopics); } else { $ex->output_file($catTopics, "../../"); } $count++; } } } } //Create Examples page $page = new Page('Examples', 'Examples', "", "../../"); $page->subtemplate('template.examples.html'); //Create Basics html $html = "Basic Examples. Programs about form, data, images, color, typography, and more...


"; $html .= ""; //Create Topics html $html .= "Topic Examples. Programs about to animation, interaction, motion, simulation, and more...


"; $html .= ""; $page->content($html); // Change 2 May 2013 //writeFile('learning/'.strtolower($subdir).'/index.html', $page->out()); writeFile('examples/index.html', $page->out()); $benchmark_end = microtime_float(); $execution_time = round($benchmark_end - $benchmark_start, 4); ?>

Examples pages generation Successful

Generated files in seconds.

Updated

childNodes as $c) { $name = htmlspecialchars($c->getAttribute('label')); if ($c->childCount > 0) { foreach ($c->childNodes as $s) { if ($s->nodeType == 1 && $s->hasAttribute("p5")) { //SM hasAttribute seems to have no effect here $my_cats[$name][$s->getAttribute('file')] = trim($s->firstChild->nodeValue); } } } } return $my_cats; } function removesymbols($str){ return preg_replace("/\W/", "", $str); } ?>