2013-02-28 11:36:12 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
|
|
<channel>
|
2013-12-15 17:17:39 +08:00
|
|
|
<% lang = SiteSetting.find_by_name('default_locale').try(:value) %>
|
2013-12-19 00:06:36 +08:00
|
|
|
<% site_email = SiteSetting.find_by_name('contact_email').try(:value) %>
|
2013-07-06 04:49:06 +08:00
|
|
|
<title><%= @title %></title>
|
|
|
|
<link><%= @link %></link>
|
|
|
|
<description><%= @description %></description>
|
2013-12-19 00:06:36 +08:00
|
|
|
<%= "<language>#{lang}</language>" if lang %>
|
2013-12-15 17:17:39 +08:00
|
|
|
<lastBuildDate><%= @topic_list.topics.first.created_at.rfc2822 %></lastBuildDate>
|
2013-07-06 04:49:06 +08:00
|
|
|
<atom:link href="<%= @atom_link %>" rel="self" type="application/rss+xml" />
|
2013-02-28 11:36:12 +08:00
|
|
|
<% @topic_list.topics.each do |topic| %>
|
2013-12-15 17:17:39 +08:00
|
|
|
<% topic_url = Discourse.base_url + topic.relative_url -%>
|
2013-02-28 11:36:12 +08:00
|
|
|
<item>
|
|
|
|
<title><%= topic.title %></title>
|
2013-12-19 00:06:36 +08:00
|
|
|
<author><%= "#{site_email} (@#{topic.user.username}#{" #{topic.user.name}" if topic.user.name.present?})" -%></author>
|
2013-12-15 17:17:39 +08:00
|
|
|
<category><%= topic.category.name %></category>
|
2013-02-28 11:36:12 +08:00
|
|
|
<description><![CDATA[
|
2013-12-19 00:06:36 +08:00
|
|
|
<p><%= t('author_wrote', author: link_to(topic.user.name, userpage_url(topic.user))).html_safe %></p>
|
2013-12-15 17:17:39 +08: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>
|
2013-02-28 11:36:12 +08:00
|
|
|
]]></description>
|
2013-12-15 17:17:39 +08:00
|
|
|
<link><%= topic_url %></link>
|
2013-02-28 11:36:12 +08:00
|
|
|
<pubDate><%= topic.created_at.rfc2822 %></pubDate>
|
2013-12-15 17:17:39 +08:00
|
|
|
<guid><%= topic_url %></guid>
|
|
|
|
<source url="<%= topic_url %>.rss"><%= topic.title %></source>
|
2013-02-28 11:36:12 +08:00
|
|
|
</item>
|
|
|
|
<% end %>
|
|
|
|
</channel>
|
|
|
|
</rss>
|