cvs: phpweb / news-1998.php news-1999.php news-2000.php news-2001.php news-2002.php news-2003.php news-2004.php news-2005.php news-2006.php /include
layout.inc

From: Date: Wed, 06 Sep 2006 11:53:45 +0000
Subject: cvs: phpweb / news-1998.php news-1999.php news-2000.php news-2001.php news-2002.php news-2003.php news-2004.php news-2005.php news-2006.php /include
layout.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-32341@lists.php.net to get a copy of this message
goba Wed Sep 6 11:53:45 2006 UTC Modified files: /phpweb news-1998.php news-1999.php news-2000.php news-2001.php news-2002.php news-2003.php news-2004.php news-2005.php news-2006.php /phpweb/include layout.inc Log: proper list navigation for the archives

http://cvs.php.net/viewvc.cgi/phpweb/news-1998.php?r1=1.2&r2=1.3&diff_format=u Index: phpweb/news-1998.php diff -u phpweb/news-1998.php:1.2 phpweb/news-1998.php:1.3 --- phpweb/news-1998.php:1.2 Mon Oct 11 13:30:59 2004 +++ phpweb/news-1998.php Wed Sep 6 11:53:45 2006 @@ -1,7 +1,8 @@ <?php -// $Id: news-1998.php,v 1.2 2004/10/11 13:30:59 goba Exp $ +// $Id: news-1998.php,v 1.3 2006/09/06 11:53:45 goba Exp $ $_SERVER['BASE_PAGE'] = 'news-1998.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; +news_archive_sidebar(); site_header("News Archive - 1998"); ?> @@ -9,8 +10,6 @@ <p> Here are the most important news items we have published in 1998 on PHP.net. - For the latest news, <a href="/index.php">check the homepage</a>. - See more archives for <?php print_news_links(); ?>. </p> <div class="newspage"> http://cvs.php.net/viewvc.cgi/phpweb/news-1999.php?r1=1.3&r2=1.4&diff_format=u Index: phpweb/news-1999.php diff -u phpweb/news-1999.php:1.3 phpweb/news-1999.php:1.4 --- phpweb/news-1999.php:1.3 Mon Oct 11 13:30:59 2004 +++ phpweb/news-1999.php Wed Sep 6 11:53:45 2006 @@ -1,7 +1,8 @@ <?php -// $Id: news-1999.php,v 1.3 2004/10/11 13:30:59 goba Exp $ +// $Id: news-1999.php,v 1.4 2006/09/06 11:53:45 goba Exp $ $_SERVER['BASE_PAGE'] = 'news-1999.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; +news_archive_sidebar(); site_header("News Archive - 1999"); ?> @@ -9,8 +10,6 @@ <p> Here are the most important news items we have published in 1999 on PHP.net. - For the latest news, <a href="/index.php">check the homepage</a>. - See more archives for <?php print_news_links(); ?>. </p> <div class="newspage"> http://cvs.php.net/viewvc.cgi/phpweb/news-2000.php?r1=1.4&r2=1.5&diff_format=u Index: phpweb/news-2000.php diff -u phpweb/news-2000.php:1.4 phpweb/news-2000.php:1.5 --- phpweb/news-2000.php:1.4 Mon Oct 11 13:30:59 2004 +++ phpweb/news-2000.php Wed Sep 6 11:53:45 2006 @@ -1,7 +1,8 @@ <?php -// $Id: news-2000.php,v 1.4 2004/10/11 13:30:59 goba Exp $ +// $Id: news-2000.php,v 1.5 2006/09/06 11:53:45 goba Exp $ $_SERVER['BASE_PAGE'] = 'news-2000.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; +news_archive_sidebar(); site_header("News Archive - 2000"); ?> @@ -9,8 +10,6 @@ <p> Here are the most important news items we have published in 2000 on PHP.net. - For the latest news, <a href="/index.php">check the homepage</a>. - See more archives for <?php print_news_links(); ?>. </p> <div class="newspage"> http://cvs.php.net/viewvc.cgi/phpweb/news-2001.php?r1=1.7&r2=1.8&diff_format=u Index: phpweb/news-2001.php diff -u phpweb/news-2001.php:1.7 phpweb/news-2001.php:1.8 --- phpweb/news-2001.php:1.7 Mon Oct 11 13:30:59 2004 +++ phpweb/news-2001.php Wed Sep 6 11:53:45 2006 @@ -1,7 +1,8 @@ <?php -// $Id: news-2001.php,v 1.7 2004/10/11 13:30:59 goba Exp $ +// $Id: news-2001.php,v 1.8 2006/09/06 11:53:45 goba Exp $ $_SERVER['BASE_PAGE'] = 'news-2001.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; +news_archive_sidebar(); site_header("News Archive - 2001"); ?> @@ -9,8 +10,6 @@ <p> Here are the most important news items we have published in 2001 on PHP.net. - For the latest news, <a href="/index.php">check the homepage</a>. - See more archives for <?php print_news_links(); ?>. </p> <div class="newspage"> http://cvs.php.net/viewvc.cgi/phpweb/news-2002.php?r1=1.6&r2=1.7&diff_format=u Index: phpweb/news-2002.php diff -u phpweb/news-2002.php:1.6 phpweb/news-2002.php:1.7 --- phpweb/news-2002.php:1.6 Mon Oct 11 13:30:59 2004 +++ phpweb/news-2002.php Wed Sep 6 11:53:45 2006 @@ -1,7 +1,8 @@ <?php -// $Id: news-2002.php,v 1.6 2004/10/11 13:30:59 goba Exp $ +// $Id: news-2002.php,v 1.7 2006/09/06 11:53:45 goba Exp $ $_SERVER['BASE_PAGE'] = 'news-2002.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; +news_archive_sidebar(); site_header("News Archive - 2002"); ?> @@ -9,8 +10,6 @@ <p> Here are the most important news items we have published in 2002 on PHP.net. - For the latest news, <a href="/index.php">check the homepage</a>. - See more archives for <?php print_news_links(); ?>. </p> <div class="newspage"> http://cvs.php.net/viewvc.cgi/phpweb/news-2003.php?r1=1.18&r2=1.19&diff_format=u Index: phpweb/news-2003.php diff -u phpweb/news-2003.php:1.18 phpweb/news-2003.php:1.19 --- phpweb/news-2003.php:1.18 Mon Oct 11 13:30:59 2004 +++ phpweb/news-2003.php Wed Sep 6 11:53:45 2006 @@ -1,7 +1,8 @@ <?php -// $Id: news-2003.php,v 1.18 2004/10/11 13:30:59 goba Exp $ +// $Id: news-2003.php,v 1.19 2006/09/06 11:53:45 goba Exp $ $_SERVER['BASE_PAGE'] = 'news-2003.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; +news_archive_sidebar(); site_header("News Archive - 2003"); ?> @@ -9,8 +10,6 @@ <p> Here are the most important news items we have published in 2003 on PHP.net. - For the latest news, <a href="/index.php">check the homepage</a>. - See more archives for <?php print_news_links(); ?>. </p> <div class="newspage"> http://cvs.php.net/viewvc.cgi/phpweb/news-2004.php?r1=1.8&r2=1.9&diff_format=u Index: phpweb/news-2004.php diff -u phpweb/news-2004.php:1.8 phpweb/news-2004.php:1.9 --- phpweb/news-2004.php:1.8 Tue Feb 28 22:35:01 2006 +++ phpweb/news-2004.php Wed Sep 6 11:53:45 2006 @@ -1,7 +1,8 @@ <?php -// $Id: news-2004.php,v 1.8 2006/02/28 22:35:01 nlopess Exp $ +// $Id: news-2004.php,v 1.9 2006/09/06 11:53:45 goba Exp $ $_SERVER['BASE_PAGE'] = 'news-2004.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; +news_archive_sidebar(); site_header("News Archive - 2004"); ?> @@ -9,8 +10,6 @@ <p> Here are the most important news items we have published in 2004 on PHP.net. - For the latest news, <a href="/index.php">check the homepage</a>. - See more archives for <?php print_news_links(); ?>. </p> <div class="newspage"> http://cvs.php.net/viewvc.cgi/phpweb/news-2005.php?r1=1.4&r2=1.5&diff_format=u Index: phpweb/news-2005.php diff -u phpweb/news-2005.php:1.4 phpweb/news-2005.php:1.5 --- phpweb/news-2005.php:1.4 Tue Apr 25 18:56:09 2006 +++ phpweb/news-2005.php Wed Sep 6 11:53:45 2006 @@ -1,7 +1,8 @@ <?php -// $Id: news-2005.php,v 1.4 2006/04/25 18:56:09 goba Exp $ +// $Id: news-2005.php,v 1.5 2006/09/06 11:53:45 goba Exp $ $_SERVER['BASE_PAGE'] = 'news-2005.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; +news_archive_sidebar(); site_header("News Archive - 2005"); ?> @@ -9,8 +10,6 @@ <p> Here are the most important news items we have published in 2005 on PHP.net. - For the latest news, <a href="/index.php">check the homepage</a>. - See more archives for <?php print_news_links(); ?>. </p> <div class="newspage"> http://cvs.php.net/viewvc.cgi/phpweb/news-2006.php?r1=1.1&r2=1.2&diff_format=u Index: phpweb/news-2006.php diff -u phpweb/news-2006.php:1.1 phpweb/news-2006.php:1.2 --- phpweb/news-2006.php:1.1 Wed Sep 6 11:41:17 2006 +++ phpweb/news-2006.php Wed Sep 6 11:53:45 2006 @@ -1,7 +1,8 @@ <?php -// $Id: news-2006.php,v 1.1 2006/09/06 11:41:17 goba Exp $ +// $Id: news-2006.php,v 1.2 2006/09/06 11:53:45 goba Exp $ $_SERVER['BASE_PAGE'] = 'news-2006.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; +news_archive_sidebar(); site_header("News Archive - 2006"); ?> @@ -9,8 +10,6 @@ <p> Here are the most important news items we have published in 2006 on PHP.net. - For the latest news, <a href="/index.php">check the homepage</a>. - See more archives for <?php print_news_links(); ?>. </p> <div class="newspage"> http://cvs.php.net/viewvc.cgi/phpweb/include/layout.inc?r1=1.233&r2=1.234&diff_format=u Index: phpweb/include/layout.inc diff -u phpweb/include/layout.inc:1.233 phpweb/include/layout.inc:1.234 --- phpweb/include/layout.inc:1.233 Wed Sep 6 11:41:17 2006 +++ phpweb/include/layout.inc Wed Sep 6 11:53:45 2006 @@ -1,5 +1,5 @@ <?php -/* $Id: layout.inc,v 1.233 2006/09/06 11:41:17 goba Exp $ */ +/* $Id: layout.inc,v 1.234 2006/09/06 11:53:45 goba Exp $ */ // Set the static content root differently on php.net $_SERVER['STATIC_ROOT'] = ($MYSITE == 'http://www.php.net/') ? @@ -757,15 +757,27 @@ } // Print news links for archives -function print_news_links() +function news_archive_sidebar() { - $links = ""; + global $SIDEBAR_DATA; + $SIDEBAR_DATA = ' +<h2>Latest news</h2> + +<p> + For the latest news, <a href="/index.php">check the homepage</a>, + or <a href="/news.rss">our RSS feed</a>. +</p> + +<h2>Archives by year</h2> + +<ul class="toc"> +'; for ($i = 1998; $i < 2007; $i++) { $pagename = "news-$i.php"; - if ($pagename == $_SERVER['BASE_PAGE']) { continue; } - $links .= '<a href="/news-' . $i . '.php">' . $i . '</a>, '; + $classname = ($pagename == $_SERVER['BASE_PAGE'] ? ' class="active"' : ''); + $SIDEBAR_DATA .= '<li><a href="/' . $pagename .'"' . $classname .'>' . $i . "</a></li>\n"; } - echo substr($links, 0, -2); + $SIDEBAR_DATA .= '</ul>'; } /* vim: set noet ts=4 sw=4 ft=php: : */
« previous php.mirrors (#32341) next »