Re: com web/php: Major homepage rework. The old layout prioritized all the wrong things. This rework is not complete, but after surveying multiple
people it does seem better already, so I decided to push.: View/HomepageNewsView.php in

From: Date: Thu, 05 Jul 2012 18:08:49 +0000
Subject: Re: com web/php: Major homepage rework. The old layout prioritized all the wrong things. This rework is not complete, but after surveying multiple
people it does seem better already, so I decided to push.: View/HomepageNewsView.php in
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-13856@lists.php.net to get a copy of this message
On Wed, Jul 4, 2012 at 12:24 AM, Levi Morrison <levim@php.net> wrote: > Commit: ee7acf4ae026dd444feae54378300e267a4e6391 > Author: Levi Morrison <levim@php.net> Tue, 3 Jul 2012 17:24:07 -0600 > Parents: 972b42119997a50ce6b1cb4d6c490cca8348c244 > Branches: master > > Link: > http://git.php.net/?p=web/php.git;a=commitdiff;h=ee7acf4ae026dd444feae54378300e267a4e6391 > > Log: > Major homepage rework. The old layout prioritized all the wrong things. This rework is not > complete, but after surveying multiple people it does seem better already, so I decided to push. > > Also fixed many small usability issues such as links not changing appearance on focus, but do > change on hover. > > Changed paths: > M View/HomepageNewsView.php > M include/footer.inc > M include/header.inc > M index-beta.php > M js/common.js > M styles/home.css > M styles/theme.css > M views/homepage/sidebar.php > + $dom = new DOMDocument(); + @$dom->loadHTML($contentRaw); + + $xpath = new DomXPath($dom); + $nodes = $xpath->query('//body/div/*'); + Wouldn't it make more sense to do this when we actually preprocess the entry on master? We can easily add a "teaser" key to the news array. + print "<div class='spanning-content'>"; Please use consistent CS, we prefer echo "just because we do" :) - <?php echo $announcements; ?> + <?php if (!empty($announcements)): + echo $announcements; + endif;?> Hmh? I would honestly prefer you used: <script language="php">if (!!empty($announcements) == false) echo $announcements; </script> if you insist on doing things the weird way ;) Meanwhile the entire rest of the codebase uses: <?php if ($announcements) { echo $announcements; } ?> Although I don't understand the reason for that if() check? If its empty, then it can just be printed out with no harm done. If it can be undeclared, then there is a bug somewhere that forgets to initialise it. -Hannes

« previous php.webmaster (#13856) next »