com web/php: Simplified Download PHP portion of homepage and corresponding portion of downloads.php: downloads.php include/header.inc
include/version.inc js/common.js styles/home.css

From: Date: Tue, 03 Jul 2012 18:55:31 +0000
Subject: com web/php: Simplified Download PHP portion of homepage and corresponding portion of downloads.php: downloads.php include/header.inc
include/version.inc js/common.js styles/home.css
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-13836@lists.php.net to get a copy of this message
Commit: b63bc20ae58b96e9822c0533384053320cc6571b Author: Levi Morrison <levim@php.net> Tue, 3 Jul 2012 12:55:31 -0600 Parents: 75d72b0f35b3cbd6fe901a3777be3412a4acf9e3 Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=b63bc20ae58b96e9822c0533384053320cc6571b Log: Simplified Download PHP portion of homepage and corresponding portion of downloads.php Changed paths: M downloads.php M include/header.inc M include/version.inc M js/common.js M styles/home.css Diff: diff --git a/downloads.php b/downloads.php index 43f29ff..14767a0 100644 --- a/downloads.php +++ b/downloads.php @@ -100,9 +100,16 @@ list($v, $a) = each($RELEASES[5]); <?php foreach($a["source"] as $rel) { echo " <li>\n "; - download_link($rel["filename"], $rel["name"]); echo " - {$rel["date"]}<br />\n"; - echo " <span class=\"md5sum\">md5: {$rel["md5"]}</span>\n"; - (isset($rel["note"]) && $rel["note"] ? "<p><strong>Note:</strong>{$rel["note"]}</p>": ""); + + if (!empty($rel['link'])) { + $link = $rel['link']; + $name = $rel['name']; + echo "<a href='$link'>$name</a>"; + } else { + download_link($rel["filename"], $rel["name"]); echo " - {$rel["date"]}<br />\n"; + echo " <span class=\"md5sum\">md5: {$rel["md5"]}</span>\n"; + (isset($rel["note"]) && $rel["note"] ? "<p><strong>Note:</strong>{$rel["note"]}</p>": ""); + } echo " </li>\n"; } ?> @@ -112,11 +119,6 @@ foreach($a["source"] as $rel) { <?php } // for ?> -<h2>Windows Binaries</h2> -<p> -For the Windows binaries and installer, see <a href='http://windows.php.net/download/'>http://windows.php.net/download/</a>. -</p> -<hr /> <h1>GPG Keys</h1> <p> diff --git a/include/header.inc b/include/header.inc index 21c8974..c0f1e65 100644 --- a/include/header.inc +++ b/include/header.inc @@ -126,10 +126,8 @@ if (isset($shortname) && $shortname) { foreach ($RELEASES[5] as $version => $release): $windowsVersionLink = substr($version, 0, strrpos($version, '.')); ?> - <li rel="/get/<?php echo $release['source'][1]['filename'] ?>/from/a/mirror"> - <a href="/get/<?php echo $release['source'][1]['filename'] ?>/from/a/mirror" class="version" title="Download PHP">PHP <?php echo $version ?></a> - <a href="/get/<?php echo $release['source'][0]['filename'] ?>/from/a/mirror" title="Download bz2 version of PHP">Download as bz2</a> - <a href="http://windows.php.net/download/#php-<?php echo $windowsVersionLink; ?>" title="Download for Windows">Download for Windows</a> + <li rel="/downloads.php#v<?php echo $version ?>"> + <a href="/downloads.php#v<?php echo $version ?>" class="version" title="Download PHP">PHP <?php echo $version ?></a> <a href="/ChangeLog-5.php#<?php echo $version ?>" title="Release Notes for <?php echo $version ?>">Release Notes</a> <!-- (size) should go here, but it's not in version.inc at present --> </li> diff --git a/include/version.inc b/include/version..inc index 78aabe9..b050f50 100644 --- a/include/version.inc +++ b/include/version.inc @@ -57,6 +57,10 @@ $RELEASES = array( "md5" => $PHP_5_4_MD5["tar.gz"], "date" => $PHP_5_4_DATE, ), + array( + "link" => 'http://windows.php.net/download/#php-5.4', + "name" => "Windows $PHP_5_4_VERSION binaries and source", + ), ), ), $PHP_5_3_VERSION => array( @@ -74,6 +78,10 @@ $RELEASES = array( "md5" => $PHP_5_3_MD5["tar.gz"], "date" => $PHP_5_3_DATE, ), + array( + "link" => 'http://windows.php.net/download/#php-5.3', + "name" => "Windows $PHP_5_3_VERSION binaries and source", + ), ), ), ), diff --git a/js/common.js b/js/common.js index 79f236a..3e0ab96 100644 --- a/js/common.js +++ b/js/common.js @@ -26,14 +26,11 @@ $(document).ready(function() { document.cookie = "BetaWarning=off; expires=" + expiry.toGMTString() + "; path=/"; }); - // This is a temporary implementation so if you click on the Arrows on the Download area of the homepage - // That it takes you to the default .gz download. Could not apply HTML5's <a> tag to wrap around the <li> - // Because it contains <a> tags within it and the target conflicted. Using <li ref="#...'> to workaround this - // Until an elegant implementation is found. + // This is a temporary implementation for clicking on the arrows for the Downloading PHP var $homeDownload = $('div.download .download-list'); if($homeDownload.length > 0) { $homeDownload.find('li').bind('click', function() { - window.location.href = $(this).attr('rel').replace('#', ''); + window.location.href = $(this).attr('rel'); }); } diff --git a/styles/home.css b/styles/home.css index 12add6e..9c389a9 100644 --- a/styles/home.css +++ b/styles/home.css @@ -6,20 +6,17 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99 #mega-drop-down div.what-is-php { color: #eee; - font-size: 1.125em; - line-height: 1.333em; width: 650px; float: left; } #mega-drop-down div.what-is-php p { + font-size: 1.125em; + line-height: 1.333em; margin:1.333em 0; } #mega-drop-down .what-is-php .tutorial { text-align: center; - font-size: 1.111em; - line-height: 1.2; - margin:1.2em 0; } #mega-drop-down .what-is-php .tutorial a { background: #669; @@ -89,37 +86,34 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99 } #mega-drop-down div.download li:first-child { - padding: 1em 0 1em 100px; background: url('/images/sprites.png') no-repeat 0px -195px; - margin-top: 0; } #mega-drop-down div.download li { color: #eee; display: block; - padding: 1em 0 0 100px; + padding: 0 0 1.5em 100px; background: url('/images/sprites.png') no-repeat 14px -273px; cursor: pointer; border-top: 1px solid #6f6f6f; - margin: 0; - font-size:.75em; + margin: -1px 0 0; line-height: 1; } #mega-drop-down div.download a { - padding-top: 0; - padding-left: 0; + padding: 0; display: block; clear: right; font-weight: normal; + line-height: 1.5em; } #mega-drop-down div.download li:first-child a:first-child { font-size: 1.5em; - line-height: 1; + line-height: 2; } #mega-drop-down div.download a:first-child { font-size: 1.25em; - line-height: 1.2; + line-height: 2.4; font-weight: bold; color: #fff; text-shadow:0 .1em .1em rgba(0,0,0,.666);

« previous php.webmaster (#13836) next »