Sha256: 5d789635bb33305832c65caa2fd35f40ff3a1ec017400a304e54cb310d26b8f9

Contents?: true

Size: 1.06 KB

Versions: 9

Compression:

Stored size: 1.06 KB

Contents

xm.item do
  xm.title post_title(item)
  if this_blog.show_extended_on_rss
    content = item.full_html
  else
    content = item.body_html
  end
  xm.description content
  xm.pubDate pub_date(item.published_at)
  xm.guid "urn:uuid:#{item.guid}", "isPermaLink" => "false"
  author = item.user.name rescue item.author
  email = item.user.email rescue nil
  author = "#{email} (#{author})" if this_blog.link_to_author unless email.blank?
  xm.author author
  xm.link post_link(item)
  for category in item.categories
    xm.category category.name
  end
  for tag in item.tags
    xm.category tag.display_name
  end

  # RSS 2.0 only allows a single enclosure per item, so only include the first one here.
  if not item.resources.empty?
    resource = item.resources.first
    xm.enclosure(
      :url => server_url_for(:controller => "files",
      :action => resource.filename),
      :length => resource.size,
      :type => resource.mime)
  end
  if item.allow_pings?
    xm.trackback :ping, server_url_for(:controller => "articles", :action =>"trackback", :id => item.id)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
typo-3.99.0 app/views/xml/_rss20_item_article.rxml
typo-3.99.1 app/views/xml/_rss20_item_article.rxml
typo-3.99.2 app/views/xml/_rss20_item_article.rxml
typo-3.99.3 app/views/xml/_rss20_item_article.rxml
typo-4.0.2 app/views/xml/_rss20_item_article.rxml
typo-3.99.4 app/views/xml/_rss20_item_article.rxml
typo-4.0.0 app/views/xml/_rss20_item_article.rxml
typo-4.0.1 app/views/xml/_rss20_item_article.rxml
typo-4.0.3 app/views/xml/_rss20_item_article.rxml