2013-02-27 22:36:12 -05:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
|
|
<channel>
|
2013-12-15 04:17:39 -05:00
|
|
|
<% lang = SiteSetting.find_by_name('default_locale').try(:value) %>
|
2013-12-18 11:06:36 -05:00
|
|
|
<% site_email = SiteSetting.find_by_name('contact_email').try(:value) %>
|
2013-07-05 16:49:06 -04:00
|
|
|
<title><%= @title %></title>
|
|
|
|
<link><%= @link %></link>
|
|
|
|
<description><%= @description %></description>
|
2013-12-18 11:06:36 -05:00
|
|
|
<%= "<language>#{lang}</language>" if lang %>
|
2014-01-17 17:52:06 -05:00
|
|
|
<% if @topic_list.topics && @topic_list.topics.length > 0 %>
|
|
|
|
<lastBuildDate><%= @topic_list.topics.first.created_at.rfc2822 %></lastBuildDate>
|
|
|
|
<atom:link href="<%= @atom_link %>" rel="self" type="application/rss+xml" />
|
|
|
|
<% @topic_list.topics.each do |topic| %>
|
|
|
|
<% topic_url = Discourse.base_url + topic.relative_url -%>
|
|
|
|
<item>
|
|
|
|
<title><%= topic.title %></title>
|
2014-03-18 18:46:48 -04:00
|
|
|
<author><%= "no-reply@example.com (@#{topic.user.username}#{" #{topic.user.name}" if topic.user.name.present?})" -%></author>
|
2014-01-17 17:52:06 -05:00
|
|
|
<category><%= topic.category.name %></category>
|
|
|
|
<description><![CDATA[
|
2014-06-04 16:51:48 -04:00
|
|
|
<p><%= t('author_wrote', author: link_to(topic.user.name, user_url(topic.user.username_lower))).html_safe %></p>
|
2014-01-17 17:52:06 -05:00
|
|
|
<blockquote>
|
|
|
|
<%= topic.posts.first.cooked.html_safe %>
|
|
|
|
</blockquote>
|
|
|
|
<p><%= t 'num_posts' %> <%= topic.posts_count %></p>
|
|
|
|
<p><%= t 'num_participants' %> <%= topic.participant_count %></p>
|
|
|
|
<p><%= link_to t('read_full_topic'), topic_url %></p>
|
|
|
|
]]></description>
|
|
|
|
<link><%= topic_url %></link>
|
|
|
|
<pubDate><%= topic.created_at.rfc2822 %></pubDate>
|
2014-05-01 14:09:15 -04:00
|
|
|
<guid isPermaLink="false">topic-<%= topic.id %></guid>
|
2014-01-17 17:52:06 -05:00
|
|
|
<source url="<%= topic_url %>.rss"><%= topic.title %></source>
|
|
|
|
</item>
|
|
|
|
<% end %>
|
2013-02-27 22:36:12 -05:00
|
|
|
<% end %>
|
|
|
|
</channel>
|
|
|
|
</rss>
|