I've just added some code to rss_news.php to take <pubdate> from the RSS feed and display the date underneath the headline.
$text_string .= date('D j M', strtotime($rss_channel["ITEMS"][$i]["PUBDATE"])) . '<br>';
In the snippet below I've added some styling so that the date is smaller & slightly greyed out.
I hope someone finds this useful and if anyone knows how to make this code any tidyer then please share, I'm a long way from a php pro!
<?php
include(DIR_WS_MODULES . '/' . FILENAME_RSS_READER);
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_RSS_NEWS);
new infoBoxHeading($info_box_contents, false, false);
$text = array();
if (isset($rss_channel["ITEMS"])) {
if (count($rss_channel["ITEMS"]) > 0) {
$maxLength = MAX_CHARACTERS;
$maxCount = (count($rss_channel["ITEMS"]) > MAX_ARTICLE) ? MAX_ARTICLE : count($rss_channel["ITEMS"]);
$text_string = '<div class="smallText" style="color: #cccccc;">';
for($i = 0;$i < $maxCount; $i++) {
$text_string .= '<strong>' . $rss_channel["ITEMS"][$i]["TITLE"] . '</strong><br>';
$text_string .= '<div style="color: #898989; font-size: 0.9em">';
$text_string .= date('D j M', strtotime($rss_channel["ITEMS"][$i]["PUBDATE"])) . '<br>';
$text_string .= '</div>';
$length = strlen(html_entity_decode($rss_channel["ITEMS"][$i]["DESCRIPTION"]));
$snip = substr(html_entity_decode($rss_channel["ITEMS"][$i]["DESCRIPTION"]),0, ($length > $maxlength) ? $maxLength : $length);
$text_string .= $snip;
if ($length > $maxLength) {
$text_string .= '...<br>';
$text_string .= '<a target="_blank" href="' . $rss_channel["ITEMS"][$i]["LINK"] . '"><font color="#dd0000">[see article]</font></a><hr>';
}
else
$text_string .= '<br><hr>';
}
$text_string .= '</div>';
if (count($rss_channel["ITEMS"]) > 5)
$text_string .= '<a title="More Feeds" href="' . tep_href_link(FILENAME_RSS_READER, '', 'NONSSL') . '"><font color="#dd0000">More News...</font></a>';
}
}
$info_box_contents = array();
$info_box_contents[] = array('text' => $text_string);
new infoBox($info_box_contents);
?>