From: <var...@us...> - 2010-01-22 15:17:02
|
Revision: 7291 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7291&view=rev Author: vargenau Date: 2010-01-22 15:16:55 +0000 (Fri, 22 Jan 2010) Log Message: ----------- Add AUTHOR and PUBDATE in RSS feed Modified Paths: -------------- trunk/lib/RssParser.php trunk/lib/plugin/RssFeed.php Modified: trunk/lib/RssParser.php =================================================================== --- trunk/lib/RssParser.php 2010-01-22 15:12:23 UTC (rev 7290) +++ trunk/lib/RssParser.php 2010-01-22 15:16:55 UTC (rev 7291) @@ -45,6 +45,8 @@ extends XmlParser { var $title = ""; + var $author = ""; + var $pubDate = ""; var $link = ""; var $description = ""; var $inside_item = false; @@ -81,6 +83,8 @@ $GLOBALS['rss_parser_items'] =& $this->items; } $this->items[] = array("title" => $this->item['TITLE'], + "author" => $this->item['AUTHOR'], + "pubDate" => $this->item['PUBDATE'], "description" => @$this->item['DESCRIPTION'], "link" => $this->item['LINK']); $this->item = array("TITLE" => "", Modified: trunk/lib/plugin/RssFeed.php =================================================================== --- trunk/lib/plugin/RssFeed.php 2010-01-22 15:12:23 UTC (rev 7290) +++ trunk/lib/plugin/RssFeed.php 2010-01-22 15:16:55 UTC (rev 7291) @@ -98,6 +98,11 @@ HTML::a(array('href'=>$item['link']), HTML::raw($item['title']))); $cell->pushContent($cell_title); + $cell_author = HTML::raw($item['author']); + $cell_pubDate = HTML::raw($item['pubDate']); + $cell_authordate = HTML::div(array('class'=> 'authordate'), + $cell_author, HTML::raw(" - "), $cell_pubDate); + $cell->pushContent($cell_authordate); if (!empty($item['description'])) $cell->pushContent(HTML::div(array('class'=> 'itemdesc'), HTML::raw($item['description']))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |