1
0
mirror of synced 2025-01-18 06:21:40 +03:00
This commit is contained in:
zYne 2007-02-25 19:34:29 +00:00
parent caf9e32c85
commit 48bab092c5
2 changed files with 16 additions and 7 deletions

View File

@ -8,9 +8,14 @@
$indexes = explode('.', $v['index']);
$level = count($indexes);
$e = explode(' - ', $v['name']);
$file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'docs' . DIRECTORY_SEPARATOR . $v['name'] . '.php';
print '<div class=level' . $level . '><font class=level' . $level . '>&nbsp;'. $v['index'] . '. <a href=documentation2.php?chapter='
. urlencode($v['name']) . ">" . end($e) ."</a></font></div>";
. urlencode($v['name']) . ">" . end($e) ."</a></font>";
if ( ! file_exists($file)) {
//print "<font color='red'>[code]</font>";
}
print "</div>";
}
} else {

View File

@ -76,13 +76,16 @@ class DocTool
return $ret;
}
public function renderBlock($name) {
public function renderBlock($name)
{
if (file_exists("docs/$name.php")) {
$c = file_get_contents("docs/$name.php");
if (substr($c, 0, 5) == "<?php") {
include("docs/$name.php");
} elseif (strpos($c, '<br \>') !== false) {
print $c;
} else {
print $this->wiki->transform($c) . "<br><br>";
}
@ -93,7 +96,8 @@ class DocTool
$this->renderCode($c);
}
}
public function renderCode($code = null) {
public function renderCode($code = null)
{
if( ! empty($code)) {
$this->highlighter->loadString($code);