This commit is contained in:
parent
caf9e32c85
commit
48bab092c5
@ -8,9 +8,14 @@
|
|||||||
$indexes = explode('.', $v['index']);
|
$indexes = explode('.', $v['index']);
|
||||||
$level = count($indexes);
|
$level = count($indexes);
|
||||||
$e = explode(' - ', $v['name']);
|
$e = explode(' - ', $v['name']);
|
||||||
|
$file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'docs' . DIRECTORY_SEPARATOR . $v['name'] . '.php';
|
||||||
|
|
||||||
print '<div class=level' . $level . '><font class=level' . $level . '> '. $v['index'] . '. <a href=documentation2.php?chapter='
|
print '<div class=level' . $level . '><font class=level' . $level . '> '. $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 {
|
} else {
|
||||||
|
|
||||||
|
@ -76,24 +76,28 @@ class DocTool
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderBlock($name) {
|
public function renderBlock($name)
|
||||||
|
{
|
||||||
|
|
||||||
if(file_exists("docs/$name.php")) {
|
if (file_exists("docs/$name.php")) {
|
||||||
$c = file_get_contents("docs/$name.php");
|
$c = file_get_contents("docs/$name.php");
|
||||||
|
|
||||||
if(substr($c, 0, 5) == "<?php") {
|
if (substr($c, 0, 5) == "<?php") {
|
||||||
include("docs/$name.php");
|
include("docs/$name.php");
|
||||||
|
} elseif (strpos($c, '<br \>') !== false) {
|
||||||
|
print $c;
|
||||||
} else {
|
} else {
|
||||||
print $this->wiki->transform($c) . "<br><br>";
|
print $this->wiki->transform($c) . "<br><br>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(file_exists("codes/$name.php")) {
|
if (file_exists("codes/$name.php")) {
|
||||||
$c = file_get_contents("codes/$name.php");
|
$c = file_get_contents("codes/$name.php");
|
||||||
$c = trim($c);
|
$c = trim($c);
|
||||||
$this->renderCode($c);
|
$this->renderCode($c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function renderCode($code = null) {
|
public function renderCode($code = null)
|
||||||
|
{
|
||||||
if( ! empty($code)) {
|
if( ! empty($code)) {
|
||||||
|
|
||||||
$this->highlighter->loadString($code);
|
$this->highlighter->loadString($code);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user