cvs: phpweb / index.php /styles site.css
| From: | Hannes Magnusson | Date: | Sun, 18 Feb 2007 16:58:40 +0000 |
| Subject: | cvs: phpweb / index.php /styles site.css | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-34354@lists.php.net to get a copy of this message | ||
bjori Sun Feb 18 16:58:40 2007 UTC
Modified files:
/phpweb index.php
/phpweb/styles site.css
Log:
Add "latest releases" box into the right bar
http://cvs.php.net/viewvc.cgi/phpweb/index.php?r1=1.865&r2=1.866&diff_format=u
Index: phpweb/index.php
diff -u phpweb/index.php:1.865 phpweb/index.php:1.866
--- phpweb/index.php:1.865 Sun Feb 18 16:29:51 2007
+++ phpweb/index.php Sun Feb 18 16:58:40 2007
@@ -19,9 +19,10 @@
*/
$timestamps[] = @filemtime("include/prepend.inc");
-// Calendar & conference teasers are the only "dynamic" features on this page
+// Calendar, conference teasers & latest releaes box are the only "dynamic" features
on this page
$timestamps[] = @filemtime("include/pregen-events.inc");
$timestamps[] = @filemtime("include/pregen-confs.inc");
+$timestamps[] = @filemtime("include/version.inc");
// The latest of these modification dates is our real Last-Modified date
$timestamp = max($timestamps);
@@ -44,6 +45,7 @@
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/pregen-events.inc';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/pregen-confs.inc';
+include_once $_SERVER['DOCUMENT_ROOT'] . '/include/version.inc';
// This goes to the left sidebar of the front page
$SIDEBAR_DATA = '
@@ -138,8 +140,53 @@
}
}
-// Prepend mirror image to sidebar text
-$RSIDEBAR_DATA = $MIRROR_IMAGE . $RSIDEBAR_DATA;
+/* {{{ Generate latest release info */
+$PHP_5_STABLE = $PHP_4_STABLE = array();
+$PHP_5_RC = $PHP_4_RC = "";
+$rel = $rc = "";
+
+list($PHP_5_STABLE, ) = each($RELEASES[5]);
+list($PHP_4_STABLE, ) = each($RELEASES[4]);
+
+$rel = <<< EOT
+ <div id="releaseBox">
+ <h4>Stable Releases</h4>
+ <ol id="releases">
+ <li class="php5"><a href="/downloads.php#v5">Current PHP 5
Stable: <span class="release">$PHP_5_STABLE</span></a></li>
+ <li class="php5"><a href="/downloads.php#v4">Current PHP 4
Stable: <span class="release">$PHP_4_STABLE</span></a></li>
+ </ol>
+ </div>\n
+EOT;
+
+/* Do we have any release candidates to brag about? */
+if (count($RELEASES[5]>1)) {
+ list($PHP_5_RC, ) = each($RELEASES[5]);
+
+ if (!empty($PHP_5_RC)) {
+ $rc .= " <li class=\"php5\"><a href=\"http://qa.php.net/#v5\">Current PHP 5 RC: <span
class=\"release\">$PHP_5_RC</span></a></li>\n";
+ }
+}
+if (count($RELEASES[4]>1)) {
+ list($PHP_4_RC, ) = each($RELEASES[4]);
+
+ if (!empty($PHP_4_RC)) {
+ $rc .= " <li class=\"php4\"><a href=\"http://qa.php.net/#v4\">Current PHP 4 RC: <span
class=\"release\">$PHP_4_RC</span></a></li>\n";
+ }
+}
+if (!empty($rc)) {
+ $rel .= <<< EOT
+ <div id="candidateBox">
+ <h4>Release Candidates</h4>
+ <ol id="candidates">
+$rc
+ </ol>
+ </div>\n
+EOT;
+}
+/* }}} */
+
+// Prepend mirror image & latest releases to sidebar text
+$RSIDEBAR_DATA = $MIRROR_IMAGE . $rel . $RSIDEBAR_DATA;
// Write out common header
site_header("Hypertext Preprocessor", array('onload' =>
'boldEvents();', 'headtags' => '<link rel="alternate"
type="application/rss+xml" title="PHP: Hypertext Preprocessor" href="'
. $MYSITE . 'news.rss" />'));
http://cvs.php.net/viewvc.cgi/phpweb/styles/site.css?r1=1.39&r2=1.40&diff_format=u
Index: phpweb/styles/site.css
diff -u phpweb/styles/site.css:1.39 phpweb/styles/site.css:1.40
--- phpweb/styles/site.css:1.39 Sun Feb 18 16:29:51 2007
+++ phpweb/styles/site.css Sun Feb 18 16:58:40 2007
@@ -51,6 +51,39 @@
border: 0px;
}
+/* {{{ The "latest releases" box on the top right */
+#releaseBox, #candidateBox {
+ border : 1px dotted #000;
+ margin : 0 0 5px 0;
+ padding: 2px;
+}
+#releaseBox h4, #candidateBox h4 {
+ border: 1px solid #000;
+ border-width: 0px 0px 1px 0px;
+ background-color: #d3d3d3;
+ margin : 0;
+ padding: 2px;
+}
+#releaseBox h4 {
+ color: #080;
+}
+#candidateBox h4 {
+ color: #C70;
+}
+ol#releases, ol#candidates {
+ margin : 0;
+ padding: 0;
+}
+ol#releases li, ol#candidates li{
+ list-style-type: none;
+ display: inline;
+ font-size: smaller;
+}
+ol#releases li span.release {
+ font-weight: bold;
+}
+/* }}} */
+
/* {{{ Errors, warning, tips classes */
p.formerror, p.warn {
border: 1px solid #666600;