cvs: phd /themes/pear pearchunkedhtml.php peartheme.php

From: Date: Sun, 05 Oct 2008 17:52:48 +0000
Subject: cvs: phd /themes/pear pearchunkedhtml.php peartheme.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-2198@lists.php.net to get a copy of this message
cweiske Sun Oct 5 17:52:48 2008 UTC Modified files: /phd/themes/pear pearchunkedhtml.php peartheme.php Log: Make the chunked html look a bit more like the old html http://cvs.php.net/viewvc.cgi/phd/themes/pear/pearchunkedhtml.php?r1=1.3&r2=1.4&diff_format=u Index: phd/themes/pear/pearchunkedhtml.php diff -u phd/themes/pear/pearchunkedhtml.php:1.3 phd/themes/pear/pearchunkedhtml.php:1.4 --- phd/themes/pear/pearchunkedhtml.php:1.3 Sun Oct 5 16:54:03 2008 +++ phd/themes/pear/pearchunkedhtml.php Sun Oct 5 17:52:48 2008 @@ -13,12 +13,20 @@ public function header($id) { $title = PhDHelper::getDescription($id, true); $parent = PhDHelper::getParent($id); - $next = $prev = $up = array(null, null); + $this->next = $this->prev = $this->up = array(null, null); if ($parent && $parent != "ROOT") { $siblings = PhDHelper::getChildren($parent); - $prev = pearweb::createPrev($id, $parent, $siblings); - $next = pearweb::createNext($id, $parent, $siblings); - $up = array($parent.".html", PhDHelper::getDescription($parent, false)); + $this->prev = pearweb::createPrev($id, $parent, $siblings); + if ($this->prev[0] == 'index') { + $this->prev = array(null, null); + } + $this->next = pearweb::createNext($id, $parent, $siblings); + if ($this->next[0] == 'index') { + $this->next = array(null, null); + } + if ($parent != 'index') { + $this->up = array($parent.".html", PhDHelper::getDescription($parent, false)); + } } $header = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> @@ -26,61 +34,56 @@ <title>' . $title . '</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <meta name="generator" content="PhD" /> - <link rel="start" href="guide.html" title="PEAR Manual" /> + <link rel="start" href="index.html" title="PEAR Manual" /> '; - if ($up[0]) - $header .= ' <link rel="up" href="'.$up[0].'" title="'.$up[1].'" /> + if ($this->up[0]) + $header .= ' <link rel="up" href="'.$this->up[0].'" title="'.$this->up[1].'" /> '; - if ($prev[0]) - $header .= ' <link rel="prev" href="'.$prev[0].'" title="'.$prev[1].'" /> + if ($this->prev[0]) + $header .= ' <link rel="prev" href="'.$this->prev[0].'" title="'.$this->prev[1].'" /> '; - if ($next[0]) - $header .= ' <link rel="next" href="'.$next[0].'" title="'.$next[1].'" /> + if ($this->next[0]) + $header .= ' <link rel="next" href="'.$this->next[0].'" title="'.$this->next[1].'" /> '; $header .= ' </head> <body> '; - $nav = <<<NAV -<table style="background-color: #E0E0E0; width: 100%; font-size: 75%; white-space: nowrap; border-collapse:collapse; border-spacing:0pt;" align="center"> - <tbody> - <tr valign="top"> - <td colspan="2" height="1"><hr style="height: 1px; margin: 0px;"/></td> - </tr> - <tr valign="top"> - <td align="left" style="padding: 0px 10px;"> - <a href="{$prev[0]}">{$prev[1]}</a> - </td> - <td align="right" style="padding: 0px 10px;"> - <a href="{$next[0]}">{$next[1]}</a> - </td> - </tr> - <tr valign="top"> - <td colspan="2" height="1"><hr style="height: 1px; margin: 0px;"/></td> - </tr> - <tr valign="top"> - <td colspan="2" align="center"><a href="{$up[0]}">{$up[1]}</a></td> - </tr> - <tr valign="top"> - <td colspan="2" height="1"><hr style="height: 1px; margin: 0px;"/></td> - </tr> - <tr valign="top"> - <td colspan="2" align="center"><a href="guide.html">PEAR Manual</a></td> - </tr> - <tr valign="top"> - <td colspan="2" height="1"><hr style="height: 1px; margin: 0px;"/></td> - </tr> - </tbody> -</table> +<div class="navheader"> + <table width="100%" summary="Navigation header"> + <tr><th colspan="3" align="center">{$title}</th></tr> + <tr> + <td width="40%" align="left"><a href="{$this->prev[0]}">Prev</a></td> + <td width="20%"></td> + <td width="40%" align="right"><a href="{$this->next[0]}">Next</a></td> + </tr> + </table> + <hr/> +</div> NAV; - $header .= $nav . "<hr /><div id=\"doc3\"><div id=\"body\">"; - $this->nav = $nav; + $header .= $nav . "<div id=\"doc3\"><div id=\"body\">"; return $header; } + public function footer($id) { - $nav = $this->nav; - $this->nav = ""; - return "<hr /></div></div>$nav</body></html>\n"; + $nav = <<<NAV +<div class="navfooter"> + <hr /> + <table width="100%" summary="Navigation footer"> + <tr> + <td width="40%" align="left"><a accesskey="p" href="{$this->prev[0]}">Prev</a></td> + <td width="20%" align="center"><a accesskey="h" href="{$this->up[0]}">{$this->up[1]}</a></td> + <td width="40%" align="right"><a accesskey="n" href="{$this->next[0]}">Next</a></td> + </tr> + <tr> + <td width="40%" align="left" valign="top">{$this->prev[1]}</td> + <td width="20%" align="center"><a accesskey="h" href="index.html">PEAR Manual</a></td> + <td width="40%" align="right" valign="top">{$this->next[1]}</td> + </tr> + </table> +</div> +NAV; + return "</div></div>$nav</body></html>\n"; } public function __destruct() { if (file_exists($this->outputdir . "guide.html") && !file_exists($this->outputdir . 'index.html')) { http://cvs.php.net/viewvc.cgi/phd/themes/pear/peartheme.php?r1=1.5&r2=1.6&diff_format=u Index: phd/themes/pear/peartheme.php diff -u phd/themes/pear/peartheme.php:1.5 phd/themes/pear/peartheme.php:1.6 --- phd/themes/pear/peartheme.php:1.5 Sun Oct 5 16:54:03 2008 +++ phd/themes/pear/peartheme.php Sun Oct 5 17:52:48 2008 @@ -592,7 +592,7 @@ public function format_funcprototype($open, $name, $attrs, $props) { if ($open) { - return '<p><code class="$name">'; + return '<p><code class="' . $name . '">'; } else return ")</code></p>"; }

« previous php.doc.cvs (#2198) next »