svn path=/trunk/boinc/; revision=9270
This commit is contained in:
David Anderson 2006-01-20 07:39:29 +00:00
parent f9b7413d58
commit 51aefe4979
5 changed files with 37 additions and 6 deletions

View File

@ -647,3 +647,15 @@ David 19 Jan 2006
sched_array.C
sched_shmem.C,h
show_shmem.C
David 19 Jan 2006
- RSS items should refer to a page that has all news items,
not just old ones
- Make news item indices permanent
html/
inc/
news.inc
user/
all_news.php (new)
sample_rss_main.php

View File

@ -51,14 +51,16 @@ echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>
// - Create news items
//
$news = min( count($project_news), $news);
$tot = count($project_news);
$news = min( $tot, $news);
for( $item=0; $item < $news; $item++ ) {
$j = $tot - $item;
if( count($project_news[$item]) == 2) {
$d = strtotime($project_news[$item][0]);
$d = strftime("%a, %d %b %Y", $d);
echo "<item>
<title>Project News ".strip_tags($project_news[$item][0])."</title>
<link>http://boinc.berkeley.edu/old_news.php#$item</link>
<link>http://boinc.berkeley.edu/all_news.php#$j</link>
<guid>$item</guid>
<description>".strip_tags($project_news[$item][1])."</description>
<pubDate>$d</pubDate>

View File

@ -18,8 +18,10 @@ function show_news($items, $n) {
}
function show_old_news($items, $n) {
$tot = count($items);
for ($i=$n; $i<count($items); $i++) {
echo "<a name=$i>\n";
$j = $tot-$i;
echo "<a name=$j>\n";
news_item($items[$i][0], $items[$i][1]);
}
}

13
html/user/all_news.php Normal file
View File

@ -0,0 +1,13 @@
<?php
require_once("../inc/util.inc");
require_once("../inc/news.inc");
require_once("../project/project_news.inc");
page_head("News archive");
show_old_news($project_news, 0);
page_tail();
?>

View File

@ -48,16 +48,18 @@ echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>
</image>
";
// - Create news items
// write news items
//
$news = min( count($project_news), $news);
$tot = count($project_news);
$news = min( $tot, $news);
for( $item=0; $item < $news; $item++ ) {
$j = $tot - $item;
if( count($project_news[$item]) == 2) {
$d = strtotime($project_news[$item][0]);
$d = strftime("%a, %d %b %Y", $d);
echo "<item>
<title>Project News ".strip_tags($project_news[$item][0])."</title>
<link>".URL_BASE."old_news.php#$item</link>
<link>".URL_BASE."all_news.php#$j</link>
<guid>$item</guid>
<description>".strip_tags($project_news[$item][1])."</description>
<pubDate>$d</pubDate>