add date, remove cruft

This commit is contained in:
Antoine Beaupré 2008-02-27 05:23:21 +00:00
parent b851a6fb99
commit cb1c8276f7
1 changed files with 3 additions and 2 deletions

View File

@ -54,14 +54,15 @@ if (include_once('magpierss/rss_fetch.inc')) {
$rss = fetch_rss( variable_get('rss_feed') ); $rss = fetch_rss( variable_get('rss_feed') );
if ($rss) { if ($rss) {
echo "<h2>" . _("Latest news") . "</h2>"; echo "<h2>" . _("Latest news") . "</h2>";
foreach ($rss->items as $item) { foreach ($rss->items as $item) {
$href = $item['link']; $href = $item['link'];
$title = $item['title']; $title = $item['title'];
echo "<h3><a href=$href>$title</a></h3>"; echo "<h3><a href=$href>$title</a></h3>";
echo '<span class="date">'.$item['pubdate'] .'</span> - ';
echo '<span class="author">'.$item['dc']['creator'].'</span>';
echo $item['summary']; echo $item['summary'];
} }
echo "</ul>";
} }
} }