cvs: phpweb(NEW_LOOK_2008) /include layout.inc shared-manual.inc /styles content.css

From: Date: Wed, 20 Aug 2008 18:03:05 +0000
Subject: cvs: phpweb(NEW_LOOK_2008) /include layout.inc shared-manual.inc /styles content.css
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-2477@lists.php.net to get a copy of this message
bjori Wed Aug 20 18:03:05 2008 UTC Modified files: (Branch: NEW_LOOK_2008) /phpweb/include layout.inc shared-manual.inc /phpweb/styles content.css Log: - Fix missing TOC on manual pages - Remove outdated TOC hack (for long function names) - Add a warning about this being developmental

http://cvs.php.net/viewvc.cgi/phpweb/include/layout.inc?r1=1.287.2.4&r2=1.287.2.5&diff_format=u Index: phpweb/include/layout.inc diff -u phpweb/include/layout.inc:1.287.2.4 phpweb/include/layout.inc:1.287.2.5 --- phpweb/include/layout.inc:1.287.2.4 Tue Aug 19 22:11:25 2008 +++ phpweb/include/layout.inc Wed Aug 20 18:03:05 2008 @@ -1,5 +1,5 @@ <?php -/* $Id: layout.inc,v 1.287.2.4 2008/08/19 22:11:25 bjori Exp $ */ +/* $Id: layout.inc,v 1.287.2.5 2008/08/20 18:03:05 bjori Exp $ */ // Set the static content root differently on php.net $_SERVER['STATIC_ROOT'] = ($MYSITE == 'http://www.php.net/') ? @@ -177,11 +177,11 @@ <h1><a href="/index.php">PHP: Hypertext Preprocessor</a></h1> <form method="post" action="/search.php" id="topsearch"> <div id="search-box"> - <label>Search for</label> - <span><input type="text" class="text" maxlength="20" name="pattern" /></span> - <label>in the</label> + <label for="searchbox">Search for</label> + <span><input type="text" class="text" maxlength="20" name="pattern" id="searchbox" /></span> + <label for="searchlist">in the</label> <span> - <select name="show"> + <select name="show" id="searchlist"> <option value="quickref" selected="selected">function list</option> <option value="all" >all php.net sites</option> <option value="local" >this mirror only</option> @@ -216,6 +216,13 @@ <li class="last"><a href="/my.php">My Php.net</a></li> </ul> </li><!--#main-menu--> + <!-- {{{ FIXME: REMOVE THIS WARNING --> + <li id="warning"> + <div class="warning"> + <strong>WARNING</strong>: You are browsing a developmental server. + </div> + </li> + <!-- }}} --> $PRE_DATA <li id="content"> <ul id="content-columns"> http://cvs.php.net/viewvc.cgi/phpweb/include/shared-manual.inc?r1=1.240.2.2&r2=1.240.2.3&diff_format=u Index: phpweb/include/shared-manual.inc diff -u phpweb/include/shared-manual.inc:1.240.2.2 phpweb/include/shared-manual.inc:1.240.2.3 --- phpweb/include/shared-manual.inc:1.240.2.2 Tue Aug 19 22:03:02 2008 +++ phpweb/include/shared-manual.inc Wed Aug 20 18:03:05 2008 @@ -1,6 +1,6 @@ <?php // -*- C++ -*- -// $Id: shared-manual.inc,v 1.240.2.2 2008/08/19 22:03:02 bjori Exp $ +// $Id: shared-manual.inc,v 1.240.2.3 2008/08/20 18:03:05 bjori Exp $ /* @@ -18,7 +18,7 @@ include $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; // Set variable defaults -$PGI = array(); $SIDEBAR_DATA = ''; +$PGI = array(); // Set up variables important for this page // including HTTP header information @@ -59,33 +59,24 @@ // Set base href for this manual page $_SERVER['BASE_HREF'] = $MYSITE . $_SERVER['BASE_PAGE']; - manual_sidebar(); site_header("$title - Manual", array( - "link" => array( - "contents" => $PGI["home"][0], - "index" => $PGI["up"][0], - "prev" => $PGI["prev"][0], - "next" => $PGI["next"][0], - "schema.dc" => "http://purl.org/dc/elements/1.1/", - "schema.rdfs" => "http://www.w3.org/2000/01/rdf-schema#", - ), - "profile" => "http://purl.org/NET/erdf/profile", - )); - echo <<< MAIN_CONTENT - <li id="main-column"> - <div class="content"> -MAIN_CONTENT; + "link" => array( + "contents" => $PGI["home"][0], + "index" => $PGI["up"][0], + "prev" => $PGI["prev"][0], + "next" => $PGI["next"][0], + "schema.dc" => "http://purl.org/dc/elements/1.1/", + "schema.rdfs" => "http://www.w3.org/2000/01/rdf-schema#", + ), + "profile" => "http://purl.org/NET/erdf/profile", + )); + manual_sidebar(); + column(COLUMN_MAIN); manual_navbar(); + box(CORNERS_TOP); -echo <<< MAIN_CONTENT - - <div class="block"><span class="corners-top"><span></span></span> - <div class="info"> - <p class="func-date">Last updated: <span>{$PGI['lastmod']}</span></p> - - -MAIN_CONTENT; + echo '<p class="func-date">Last updated: <span>' .$PGI['lastmod']. '</span></p>'; } @@ -97,17 +88,12 @@ // Get vars for easy handling list($filename, $title) = $PGI['this']; - echo "</div><!-- .info -->\n"; - echo '<span class="corners-bottom"><span></span></span></div><!--.block-->'; - + box(); manual_notes(); manual_navbar("bottom"); - echo <<< MAIN_CONTENT - </div> <!-- .content --> - </li><!-- #main-column--> -MAIN_CONTENT; + column(); site_footer(); } @@ -116,36 +102,33 @@ // Manual page navigation parts // ============================================================================= -// Append all the table of contents data to $SIDEBAR_DATA +// Print the TOC function manual_sidebar() { - global $PGI, $SIDEBAR_DATA; + global $PGI; + column_box(COLUMN_LEFT); - // Start sidebar with its <div> - $BAR = <<< SIDEBAR - <div class="content"> - <div class="block"><span class="corners-top"><span></span></span> - <div class="info"> - <h3>PHP Manual</h3> - <ul id="functions-list"> + echo <<< SIDEBAR + <h3>PHP Manual</h3> + <ul id="functions-list"> SIDEBAR; // Link to manual home - $BAR .= ' <li class="header home"><a href="' . $PGI['home'][0] . '">' . + echo ' <li class="header home"><a href="' . $PGI['home'][0] . '">' . $PGI['home'][1] . "</a></li>\n"; // Link to parents if (isset($PGI['parents']) && ($c = count($PGI['parents'])-1) > 0) { // The root parent is the "PHP Manual" for($i=$c-1; $i>=0; $i--) { - $BAR .= ' <li class="header up"><a href="' . $PGI['parents'][$i][0] . '">' . + echo ' <li class="header up"><a href="' . $PGI['parents'][$i][0] . '">' . $PGI['parents'][$i][1] . "</a></li>\n"; } } // Link to one page up if titles does not match if (($PGI['home'][1] !== $PGI['up'][1]) && $PGI['up'][1]) { - $BAR .= ' <li class="header up sel"><a href="' . $PGI['up'][0] . '">' . + echo ' <li class="header up sel"><a href="' . $PGI['up'][0] . '">' . $PGI['up'][1] . "</a><ul>\n"; } @@ -157,33 +140,16 @@ // Get the proper classname to use for this <div> $liclass = ($url == $PGI['this'][0]) ? ' class="sel"' : ""; - - // There are some very long function names, which - // make the TOC too wide, so enable the browser to wrap them - // eg: xml_set_processing_instruction_handler - // DOMElement->getElementsByTagNameNS() - if (preg_match("!^[a-zA-Z0-9_>()-:]+$!", $title)) { - $wrap = '<span class="w"> </span>'; - $title = str_replace(array('_', '->', '::'), array("_$wrap", "->$wrap", "::$wrap"), $title); - } - + // Print out the TOC item using a <div> - $BAR .= " <li{$liclass}>" . + echo " <li{$liclass}>" . make_link($url, $title) . "</li>\n"; } - $close = ""; if (($PGI['home'][1] !== $PGI['up'][1]) && $PGI['up'][1]) { - $close = "</ul></li>"; - } - // Put navigation content into sidebar, end <div> - $SIDEBAR_DATA = <<< SIDEBAR - $BAR - </ul> - </div> - <span class="corners-bottom"><span></span></span></div><!--.block--> - </div><!-- .content --> -SIDEBAR; + echo "</ul></li>"; + } + column_box(); } @@ -265,10 +231,7 @@ if(count($notes) > 2) { manual_navbar("bottom"); } -echo <<< MAIN_CONTENT - <div class="block"><span class="corners-top"><span></span></span> -MAIN_CONTENT; - + box(CORNERS_TOP); // Link target to add a note to the current manual page, // and it's extended form with a [+] image @@ -293,19 +256,18 @@ // If we have notes, print them out else { - echo '<ul id="contributed-notes">'; + echo '<ul id="contributed-notes">'; foreach($notes as $note) { manual_note_display( $note['xwhen'], $note['user'], $note['note'], $note['id'] ); } - echo "</ul>\n"; + echo "</ul>\n"; echo $addnotesnippet; } - // End of #usernotes - echo "</div>"; - echo '<span class="corners-bottom"><span></span></span></div><!--.block-->'; + echo "</div><!-- #usernotes -->\n"; + box(); } // Get user notes from the appropriate text dump @@ -388,3 +350,4 @@ USER_NOTE_TEXT; } + http://cvs.php.net/viewvc.cgi/phpweb/styles/content.css?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: phpweb/styles/content.css diff -u phpweb/styles/content.css:1.1.2.1 phpweb/styles/content.css:1.1.2.2 --- phpweb/styles/content.css:1.1.2.1 Sun Aug 17 16:01:51 2008 +++ phpweb/styles/content.css Wed Aug 20 18:03:05 2008 @@ -114,7 +114,7 @@ #news-line, #main-column .adv-block { font-size: 1.1em; - line-height:1.2; + line-height:1.2; margin-bottom: 6px; padding: 0 11px; background: none left bottom repeat-x #F6F6F6; @@ -856,4 +856,26 @@ padding:0 0 1em 0; } +/***** {{{ REMOVE ME *****/ +/* + * This is only during development so that users of docs.php.net can get a big + * fat red warning about that thei are browser developmental server. + */ +#main-menu { + margin-bottom: 0; +} + +#warning { + background:#ffffff; + padding:1em; + margin: 0px; + border-bottom:1px solid #D0D0D0; + color:#6F0000; + margin-bottom: 6px; + text-align: center; + font-weight: bold; + font-size:1.17em; +} +/***** }}} *****/ +
« previous php.webmaster (#2477) next »