Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 7
- Log:
Initial import of RForum 0.2 sources from a downloaded Tarball.
RForum is a Ruby On Rails based forum and mail gateway service.
- Author:
- adh
- Date:
- Sat Jul 22 18:43:13 +0100 2006
- Size:
- 2109 Bytes
1 | '<?xml version="1.0" encoding="' + RForum::CONFIG[:web_charset] + '"?> |
2 | <?xml-stylesheet type="text/css" href="http://de.wikipedia.org/style/feed.css"?> |
3 | ' + |
4 | xml.feed('version' => '0.3', 'xmlns' => 'http://purl.org/atom/ns#', 'xml:lang' => 'de') do |
5 | |
6 | if @modified |
7 | xml.modified @modified.getgm.strftime('%Y-%m-%dT%H:%M:%SZ') |
8 | end |
9 | |
10 | if @topic |
11 | xml.title h(@topic.subject) |
12 | |
13 | xml.link( |
14 | 'rel' => 'alternate', |
15 | 'type' => 'text/html', |
16 | 'href' => url_for(:only_path => false, :controller => 'topic', :action => 'show', :id => @topic.id) |
17 | ) |
18 | elsif @forum |
19 | xml.title h(@forum.name) |
20 | |
21 | xml.link( |
22 | 'rel' => 'alternate', |
23 | 'type' => 'text/html', |
24 | 'href' => url_for(:only_path => false, :controller => 'forum', :action => 'forum', :id => @forum.id) |
25 | ) |
26 | else |
27 | xml.title h("New posts in " + RForum::CONFIG[:site_name]) |
28 | |
29 | xml.link( |
30 | 'rel' => 'alternate', |
31 | 'type' => 'text/html', |
32 | 'href' => url_for(:only_path => false, :controller => 'forum', :action => 'list') |
33 | ) |
34 | end |
35 | |
36 | @posts.each do |post| |
37 | xml.entry do |
38 | xml.id( |
39 | 'tag:' + RForum::CONFIG[:hostname] + ',' + |
40 | post.created_at.getgm.strftime('%Y-%m-%d') + ':' + |
41 | post.id.to_s |
42 | ) |
43 | xml.link( |
44 | 'rel' => 'alternate', |
45 | 'type' => 'text/html', |
46 | 'href' => url_for(:only_path => false, :controller => 'topic', :action => 'show', :id => post.topic_id, :anchor => post.id) |
47 | ) |
48 | xml.title h(post.subject) |
49 | xml.author { |
50 | xml.name h( |
51 | post.get_display_name.to_s + (" (Guest)" unless post.user_id).to_s |
52 | ) |
53 | } |
54 | xml.created(post.created_at.getgm.strftime('%Y-%m-%dT%H:%M:%SZ')) |
55 | xml.issued(post.created_at.getgm.strftime('%Y-%m-%dT%H:%M:%SZ')) |
56 | xml.modified(post.updated_at.getgm.strftime('%Y-%m-%dT%H:%M:%SZ')) |
57 | |
58 | if @with_text |
59 | xml.content('type' => 'application/xhtml+xml') do |
60 | xml.div('xmlns' => 'http://www.w3.org/1999/xhtml') do |
61 | xml.pre do |
62 | xml << h(post.text) |
63 | end |
64 | end |
65 | end |
66 | end |
67 | |
68 | end |
69 | end |
70 | end |