Since there is some discussion going on about this, I'll chime in and say I don't like the drop-down menu at all. The documentation portion is too big to really fit into a menu. Additionally, people generally browse the documentation via search so navigation is a solved issue in principle. The community menu changes with content and I think that's improper for primary navigation.
Levi Morrison On Sat, Jan 5, 2013 at 4:27 AM, Hannes Magnusson <hannes.magnus...@gmail.com> wrote: > Hmmmh.. > I must say, I was a fan of the previous documentation mega-drop-down.. > people don't necessarily know the internal structure of the manual so > it helped them visualise it and ctrl+f find stuff. > > -Hannes > > On Thu, Dec 27, 2012 at 3:30 AM, Adam Harvey <ahar...@php.net> wrote: >> Commit: 4c90fd2b9a73780889f1b0e06a329112304fba75 >> Author: Adam Harvey <ahar...@php.net> Thu, 27 Dec 2012 19:30:29 >> +0800 >> Parents: 5c8beafabc9c4cee910835e90e38a65a0a4d09c2 >> Branches: master >> >> Link: >> http://git.php.net/?p=web/php.git;a=commitdiff;h=4c90fd2b9a73780889f1b0e06a329112304fba75 >> >> Log: >> A few mega dropdown updates to try to consolidate it and make it more kilo >> than >> mega. >> >> Feedback is definitely welcome on the documentation dropdown changes. >> >> Squashed commit of the following: >> >> commit 6c282d4558e77c2f9943db318691bef596e4fd4b >> Author: Adam Harvey <ahar...@php.net> >> Date: Thu Dec 27 19:30:16 2012 +0800 >> >> Update the community links. >> >> commit 82edf79fff4a500e3ca4a349b4c100e70d651f7e >> Author: Adam Harvey <ahar...@php.net> >> Date: Thu Dec 27 19:12:38 2012 +0800 >> >> Move the calendar of events link under news to better balance the >> community >> dropdown. >> >> commit 809d2a9f6044db71a117453575a9882c5607d8a6 >> Author: Adam Harvey <ahar...@php.net> >> Date: Thu Dec 27 19:07:10 2012 +0800 >> >> Add a direct link to the manual TOC, and replace database with date/time >> in the >> function reference, as that seems to be more commonly hit per Webalizer. >> >> commit 73ca38258415f275a148fc8f74c91833eaf4ac71 >> Author: Adam Harvey <ahar...@php.net> >> Date: Thu Dec 27 18:55:44 2012 +0800 >> >> Attempt to cut the documentation mega dropdown... er, down. >> >> At present, this is more than the height of my viewport on a MBP. This is >> obviously a bad thing, and nobody in their right mind is ever going to >> read it. >> I've cut it down to a maximum of one heading and five entries per column. >> >> For the time being, I've tried to guess what the most hit and important >> pages >> are in the manual, but hopefully we can get some metrics on this before >> the >> beta site is launched and adjust accordingly. >> >> Changed paths: >> M include/header.inc >> M include/layout.inc >> >> >> Diff: >> diff --git a/include/header.inc b/include/header.inc >> index 1a230e5..4d3cb02 100644 >> --- a/include/header.inc >> +++ b/include/header.inc >> @@ -152,18 +152,22 @@ if (isset($shortname) && $shortname) { >> <li class="parent <?php echo $curr == "community" ? "current" : ""?>"> >> <a href="#community" class="menu-link">Community</a> >> <div class="children" id="community"><div class="children-1"><div >> class="children-2"> >> - <?php news_toc(array('news')) ?> >> - <?php news_toc(array('conferences', 'papers')) ?> >> + <dl> >> + <?php news_toc(array('news')) ?> >> + <dt><a href="/cal.php">Calendar of Events</a></dt> >> + </dl> >> + <dl> >> + <?php news_toc(array('conferences', 'papers')) ?> >> + </dl> >> <dl> >> <dt><a href="https://wiki.php.net/">PHP Wiki</a></dt> >> - <dd><a href="https://wiki.php.net/rfc">Write a RFC</a></dd> >> + <dd><a href="https://wiki.php.net/rfc">Write an RFC</a></dd> >> <dt><a href="/get-involved.php">Get Involved</a></dt> >> - <dd><a href="#">Report bugs</a></dd> >> + <dd><a href="https://bugs.php.net/how-to-report.php">Report >> bugs</a></dd> >> <dd><a href="#">Contribute code</a></dd> >> <dd><a href="#">Organize an event</a></dd> >> <dd><a href="#">Write documentation</a></dd> >> <dd><a href="#">Test PHP</a></dd> >> - <dt><a href="/cal.php">Calendar of Events</a></dt> >> <dd></dd> >> </dl> >> <dl> >> diff --git a/include/layout.inc b/include/layout.inc >> index be381e5..c439e90 100644 >> --- a/include/layout.inc >> +++ b/include/layout.inc >> @@ -871,7 +871,6 @@ function news_toc($sections = null) { >> ), >> ); >> >> - echo "<dl>\n"; >> foreach($items as $section => $menu) { >> >> // only print requested sections. >> @@ -884,7 +883,6 @@ function news_toc($sections = null) { >> echo "<dd><a >> href='{$child["permlink"]}'>{$child["title"]}</a></dd>\n"; >> } >> } >> - echo "</dl>\n"; >> } >> function doc_toc($lang) { >> $file = dirname(__FILE__) . "/../manual/$lang/toc/index.inc"; >> @@ -894,31 +892,53 @@ function doc_toc($lang) { >> } >> require dirname(__FILE__) . "/../manual/$lang/toc/index.inc"; >> >> - echo "<dl>\n"; >> - doc_toc_list($lang, $TOC, "getting-started"); >> - doc_toc_list($lang, $TOC, "langref"); >> - echo "</dl>\n"; >> - >> - echo "<dl>\n"; >> - doc_toc_list($lang, $TOC, "security"); >> - doc_toc_list($lang, $TOC, "features"); >> - echo "</dl>\n"; >> - >> - echo "<dl>\n"; >> - doc_toc_list($lang, $TOC, "funcref"); >> - echo "</dl>\n"; >> - >> - echo "<dl>\n"; >> - echo "<dt>Miscellaneous</dt>"; >> - doc_toc_title($lang, $TOC, "install", "dd"); >> - doc_toc_title($lang, $TOC, "internals2", "dd"); >> - doc_toc_title($lang, $TOC, "faq", "dd"); >> - doc_toc_title($lang, $TOC, "appendices", "dd"); >> - echo "<dd><a href='/quickref.php'>Quick Function Reference</a></dd>\n"; >> - echo "<dd><a href='/docs.php'>Translations</a></dd>\n"; >> - echo "<dd><a href='/download-docs.php'>Documentation >> Downloads</a></dd>\n"; >> - echo "</dl>\n"; >> +?> >> + <dl> >> + <dt><a href="/manual/">PHP Manual</a></dt> >> + <?php doc_toc_list($lang, $TOC, 'getting-started'); ?> >> + <?php doc_toc_title($lang, $TOC, 'install', 'dd'); ?> >> + </dl> >> + >> + <dl> >> + <?php doc_toc_title($lang, $TOC, 'langref'); ?> >> + <?php doc_sub_entry($lang, 'langref', 'language.basic-syntax'); ?> >> + <?php doc_sub_entry($lang, 'langref', 'language.variables'); ?> >> + <?php doc_sub_entry($lang, 'langref', 'language.operators'); ?> >> + <?php doc_sub_entry($lang, 'langref', 'language.functions'); ?> >> + <?php doc_sub_entry($lang, 'langref', 'language.oop5'); ?> >> + </dl> >> + >> + <dl> >> + <?php doc_toc_title($lang, $TOC, 'funcref'); ?> >> + <?php doc_sub_entry($lang, 'refs.basic.vartype', 'book.array'); ?> >> + <?php doc_sub_entry($lang, 'refs.calendar', 'book.datetime'); ?> >> + <?php doc_sub_entry($lang, 'refs.basic.text', 'book.strings'); ?> >> + <?php doc_toc_title($lang, $TOC, 'faq'); ?> >> + </dl> >> + >> + <dl> >> + <?php doc_toc_title($lang, $TOC, 'security'); ?> >> + <?php doc_sub_entry($lang, 'security', 'security.database'); ?> >> + <?php doc_sub_entry($lang, 'security', 'security.variables'); ?> >> + <?php doc_sub_entry($lang, 'faq', 'faq.passwords'); ?> >> + <?php doc_toc_title($lang, $TOC, 'appendices'); ?> >> + </dl> >> +<?php >> +} >> +function doc_sub_entry($lang, $file, $subfile, $elm = "dd") { >> + static $cache = array(); >> >> + if (isset($cache["$lang.$file"])) { >> + $TOC = $cache["$lang.$file"]; >> + } else { >> + include dirname(__FILE__) . "/../manual/$lang/toc/$file.inc"; >> + } >> + >> + foreach($TOC as $entry) { >> + if (substr($entry[0], 0, strlen($subfile)) == $subfile) { >> + echo "\t<$elm><a >> href='/manual/$lang/{$entry[0]}'>{$entry[1]}</a></$elm>\n"; >> + } >> + } >> } >> function doc_toc_list($lang, $index, $file) { >> include dirname(__FILE__) . "/../manual/$lang/toc/$file.inc"; >> >> >> -- >> PHP Webmaster List Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > -- > PHP Webmaster List Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php