From 7de3e31a3217bc507ba89fd997800158c0e21c1c Mon Sep 17 00:00:00 2001 From: zYne Date: Fri, 23 Feb 2007 19:41:42 +0000 Subject: [PATCH] --- manual/content.php | 21 +++++++++++---------- manual/documentation.php | 30 ++++++++++++++++++++++++++++++ manual/documentation2.php | 14 ++++++++++++-- manual/highlight.php | 4 ++-- manual/styles/basic.css | 3 +++ 5 files changed, 58 insertions(+), 14 deletions(-) diff --git a/manual/content.php b/manual/content.php index 3d679db95..b69897514 100644 --- a/manual/content.php +++ b/manual/content.php @@ -112,16 +112,17 @@ while($count--) { array_shift($p); } - - print "
'; - ?> - - ' . end($p); ?> -
- ' . $i[$x]['index']; + ?> + + ' . end($p); ?> + + "; } +/** + public function parseIndex($index, $path = array(), $counters = array()) + { + $ret = array(); + foreach ($index as $k => $v) { + $i = count($path) - 1; + + $counters[$i]++; + + if (is_array($v)) { + if ( ! is_numeric($k)) { + $tmp = $path; + $tmp[] = $k; + + $chapterName = ( ! empty($path)) ? implode(' - ', $path) . ' - ' . $k : $k; + + $ret[] = array('index' => implode('.', $counters), + 'name' => $chapterName); + } + + $ret = array_merge($ret, $this->parseIndex($v, $tmp, $counters)); + } else { + $chapterName = ( ! empty($path)) ? implode(' - ', $path) . ' - ' . $v : $v; + + $ret[] = array('index' => implode('.', $counters), + 'name' => $chapterName); + } + } + return $ret; + }*/ function render_block($name) { if(file_exists("docs/$name.php")) { diff --git a/manual/documentation2.php b/manual/documentation2.php index db91b0ab2..40da68a14 100644 --- a/manual/documentation2.php +++ b/manual/documentation2.php @@ -1,22 +1,32 @@ highlighter = new PHP_Highlight; + $this->wiki = new Text_Wiki; } public function parseIndex2($index) { @@ -74,7 +84,7 @@ class DocTool if(substr($c, 0, 5) == "
"; + print $this->wiki->transform($c) . "

"; } } if(file_exists("codes/$name.php")) { diff --git a/manual/highlight.php b/manual/highlight.php index 7cdfeb242..0498f51d3 100644 --- a/manual/highlight.php +++ b/manual/highlight.php @@ -339,7 +339,7 @@ class PHP_Highlight // Format code $source = $this->toArray($funcref); - $out = "
\n"; + $out = "
"; foreach ($source as $i => $line) { $out .= ' '; @@ -350,7 +350,7 @@ class PHP_Highlight $out .= empty($line) ? ' ' : $line; $out .= "
\n"; } - $out .= "
\n"; + $out .= "
"; if ($return === true) { return $out; diff --git a/manual/styles/basic.css b/manual/styles/basic.css index e10eca15b..7976a56d9 100644 --- a/manual/styles/basic.css +++ b/manual/styles/basic.css @@ -106,6 +106,9 @@ font-size: 14 px; i { color: #367FAC; } +em { +color: #367FAC; +} a { color: #367FAC; }