Skip to content

Commit

Permalink
Fixes some rss feed validation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Mar 15, 2012
1 parent d8a9eff commit eded7c5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions external/feedcreator.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@ function createFeed() {
$feed.= ' xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"'."\n";
$feed.= ' xmlns:slash="http://purl.org/rss/1.0/modules/slash/"'."\n";
$feed.= ">\n";
$feed.= ' <atom:link href="'.$this->syndicationURL.'" rel="self" type="application/rss+xml" />'."\n";
$feed.= " <channel>\n";
$feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."</title>\n";
$this->descriptionTruncSize = 500;
Expand Down
1 change: 1 addition & 0 deletions framework/core/controllers/expController.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ function getRSSContent() {
$rss_item->description = expString::convertSmartQuotes($item->body);
$rss_item->date = isset($item->publish_date) ? date('r',$item->publish_date) : date('r', $item->created_at);
$rss_item->link = makeLink(array('controller'=>$this->classname, 'action'=>'show', 'title'=>$item->sef_url));
$rss_item->guid = expUnserialize($item->location_data)->src.'-id#'.$item->id;
if (!empty($item->expCat[0]->title)) $rss_item->category = array($item->expCat[0]->title);
$comment_count = expCommentController::findComments(array('content_id'=>$item->id,'content_type'=>$this->basemodel_name));
if ($comment_count) {
Expand Down
1 change: 1 addition & 0 deletions framework/modules/blog/controllers/blogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ function getRSSContent() {
$rss_item->description = expString::convertSmartQuotes($item->body);
$rss_item->date = isset($item->publish_date) ? date('r',$item->publish_date) : date('r', $item->created_at);
$rss_item->link = makeLink(array('controller'=>$this->classname, 'action'=>'show', 'title'=>$item->sef_url));
$rss_item->guid = expUnserialize($item->location_data)->src.'-id#'.$item->id;
if (!empty($item->expCat[0]->title)) $rss_item->category = array($item->expCat[0]->title);
$comment_count = expCommentController::findComments(array('content_id'=>$item->id,'content_type'=>$this->basemodel_name));
if ($comment_count) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ function getRSSContent() {
$rss_item->description = expString::convertSmartQuotes($item->body);
$rss_item->date = isset($item->publish_date) ? date('r',$item->publish_date) : date('r', $item->created_at);
$rss_item->link = makeLink(array('controller'=>$this->classname, 'action'=>'show', 'title'=>$item->sef_url));
$rss_item->guid = expUnserialize($item->location_data)->src.'-id#'.$item->id;
if (!empty($item->expCat[0]->title)) $rss_item->category = array($item->expCat[0]->title);

// Add the attachment/enclosure info
Expand Down
3 changes: 2 additions & 1 deletion site_rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@

if ($site_rss->enable_rss == true) {
$rss = new UniversalFeedCreator();
$rss->encoding = LANG_CHARSET;
$rss->cssStyleSheet = "";
// $rss->useCached("PODCAST");
$rss->useCached();
$rss->title = $site_rss->feed_title;
$rss->description = $site_rss->feed_desc;
$rss->image->url = URL_FULL.'themes/'.DISPLAY_THEME.'/images/logo.png';
$rss->image->title = ORGANIZATION_NAME;
$rss->image->title = $site_rss->feed_title;
$rss->image->link = URL_FULL;
// $rss->image->width = 64;
// $rss->image->height = 64;
Expand Down

0 comments on commit eded7c5

Please sign in to comment.