radiant-forum-extension 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/views/forums/index.html.haml +3 -0
- data/app/views/forums/show.html.haml +3 -0
- data/app/views/posts/index.html.haml +12 -8
- data/app/views/posts/index.rss.builder +23 -5
- data/app/views/topics/index.html.haml +3 -0
- data/app/views/topics/index.rss.builder +3 -3
- data/app/views/topics/show.html.haml +3 -0
- data/app/views/topics/show.rss.builder +2 -2
- data/config/locales/en.yml +7 -3
- data/forum_extension.rb +1 -1
- data/radiant-forum-extension.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.7
|
@@ -1,11 +1,17 @@
|
|
1
|
-
- if !@term.blank? || @reader || @forum || @topic
|
2
|
-
- @searching = true
|
1
|
+
- if @searching = !@term.blank? || @reader || @forum || @topic
|
3
2
|
- summary = [t('topics_and_posts')]
|
4
3
|
- summary << t('in') + ' ' + link_to(@forum.name, forum_url(@forum)) if @forum
|
5
4
|
- summary << t('containing') + " <strong>#{@term}</strong>" unless @term.blank?
|
6
5
|
- summary << t('posted_by') + ' ' + link_to(@reader.name, reader_url(@reader)) if @reader
|
7
6
|
- summary << t('in_topic') + ' ' + link_to(@topic.name, forum_topic_url(@topic.forum, @topic)) if @topic
|
8
7
|
|
8
|
+
- feed_url_parts = {:format => :rss}
|
9
|
+
- if @searching
|
10
|
+
- feed_url_parts[:q] = @term unless @term.blank?
|
11
|
+
- feed_url_parts[:reader_id] = @reader.id if @reader
|
12
|
+
- feed_url_parts[:forum_id] = @forum.id if @forum
|
13
|
+
- feed_url_parts[:reader_id] = @topic.id if @topic
|
14
|
+
|
9
15
|
= render :partial => 'forums/standard_parts'
|
10
16
|
|
11
17
|
- content_for :title do
|
@@ -31,13 +37,11 @@
|
|
31
37
|
= t('separator')
|
32
38
|
= yield :title
|
33
39
|
|
40
|
+
- content_for :feedurl do
|
41
|
+
= posts_path(feed_url_parts)
|
42
|
+
|
34
43
|
- content_for :feedlink do
|
35
|
-
|
36
|
-
- url_parts[:term] = @term unless @term.blank?
|
37
|
-
- url_parts[:reader_id] = @reader.id if @reader
|
38
|
-
- url_parts[:forum_id] = @forum.id if @forum
|
39
|
-
- url_parts[:reader_id] = @topic.id if @topic
|
40
|
-
= feed_link(posts_path(url_parts))
|
44
|
+
= feed_link(posts_path(feed_url_parts))
|
41
45
|
|
42
46
|
- content_for :messages do
|
43
47
|
- if @posts.empty?
|
@@ -1,14 +1,32 @@
|
|
1
|
+
@searching = !@term.blank? || @reader || @forum || @topic
|
2
|
+
|
1
3
|
xml.channel do
|
2
4
|
xml.atom :link, nil, {
|
3
5
|
:href => formatted_posts_url(:rss),
|
4
6
|
:rel => 'self', :type => 'application/rss+xml'
|
5
7
|
}
|
6
8
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
if @searching
|
10
|
+
summary = [t('topics_and_posts')]
|
11
|
+
summary << t('matching') + " '#{@term}'" unless @term.blank?
|
12
|
+
summary << t('posted_by') + " #{@reader.name}" if @reader
|
13
|
+
summary << t('in_forum') + " #{@forum.name}" if @forum
|
14
|
+
xml.title Radiant::Config['site.name'] + ': ' + summary.join(' ')
|
15
|
+
xml.description summary.join(' ')
|
16
|
+
else
|
17
|
+
xml.title Radiant::Config['site.name'] + ': ' + t('latest_posts')
|
18
|
+
xml.description t('latest_posts_description')
|
19
|
+
end
|
20
|
+
|
21
|
+
url_parts = {}
|
22
|
+
url_parts[:q] = @term unless @term.blank?
|
23
|
+
url_parts[:reader_id] = @reader.id if @reader
|
24
|
+
url_parts[:forum_id] = @forum.id if @forum
|
25
|
+
url_parts[:reader_id] = @topic.id if @topic
|
26
|
+
xml.link posts_url(url_parts)
|
27
|
+
|
28
|
+
xml.language I18n.locale.to_s
|
11
29
|
xml.ttl "60"
|
12
30
|
|
13
|
-
render :partial => "post", :collection => @posts, :locals => {:xm => xml}
|
31
|
+
render :partial => "posts/post", :collection => @posts, :locals => {:xm => xml}
|
14
32
|
end
|
@@ -4,10 +4,10 @@ xml.channel do
|
|
4
4
|
:rel => 'self', :type => 'application/rss+xml'
|
5
5
|
}
|
6
6
|
|
7
|
-
xml.title "#{@site_title} :
|
8
|
-
xml.description "
|
7
|
+
xml.title "#{@site_title} : #{t('latest_topics')}"
|
8
|
+
xml.description t("latest_topics_description")
|
9
9
|
xml.link topics_url
|
10
|
-
xml.language
|
10
|
+
xml.language I18n.locale.to_s
|
11
11
|
xml.ttl "60"
|
12
12
|
|
13
13
|
render :partial => "topic", :collection => @topics, :locals => {:xm => xml}
|
@@ -16,6 +16,9 @@
|
|
16
16
|
- content_for :first_post do
|
17
17
|
= render :partial => 'posts/post', :locals => {:post => @topic.posts.first, :headless => true, :with_context => true}
|
18
18
|
|
19
|
+
- content_for :feedurl do
|
20
|
+
= topic_path(@topic, :format => :rss)
|
21
|
+
|
19
22
|
- content_for :feedlink do
|
20
23
|
= feed_link(topic_path(@topic, :format => :rss))
|
21
24
|
|
@@ -5,9 +5,9 @@ xml.channel do
|
|
5
5
|
}
|
6
6
|
|
7
7
|
xml.title "#{@site_title} : #{@topic.name}"
|
8
|
-
xml.description "#{@posts.length} posts,
|
8
|
+
xml.description "#{@posts.length} #{t('posts')}, #{t('most_recently')} #{t('from_reader', :name => @posts.last.reader.name)} #{t('on_date', :date => friendly_date(@posts.last.created_at))}"
|
9
9
|
xml.link forum_topic_url(@topic.forum, @topic)
|
10
|
-
xml.language
|
10
|
+
xml.language I18n.locale.to_s
|
11
11
|
xml.ttl "60"
|
12
12
|
|
13
13
|
render :partial => "posts/post", :object => @topic.posts.first, :locals => {:xm => xml}
|
data/config/locales/en.yml
CHANGED
@@ -55,6 +55,7 @@ en:
|
|
55
55
|
from_reader: "from %{name}"
|
56
56
|
if_you_not: "If you're not %{name}, please"
|
57
57
|
in: "in"
|
58
|
+
in_forum: "filed under"
|
58
59
|
in_reply_to: "in reply to"
|
59
60
|
label:
|
60
61
|
post:
|
@@ -67,8 +68,10 @@ en:
|
|
67
68
|
last_seen: "last here"
|
68
69
|
latest_activity: "latest activity"
|
69
70
|
latest_discussion: "Latest topics"
|
70
|
-
latest_posts: "Latest
|
71
|
-
|
71
|
+
latest_posts: "Latest posts"
|
72
|
+
latest_posts_description: "Topics and replies from across the forum in descending date order."
|
73
|
+
latest_topics: "Latest topics"
|
74
|
+
latest_topics_description: "Topics most recently posted or replied to."
|
72
75
|
locked: "locked"
|
73
76
|
matching: "matching"
|
74
77
|
messages_from_reader: "Messages from %{name}"
|
@@ -138,14 +141,15 @@ en:
|
|
138
141
|
save_changes: "Save changes"
|
139
142
|
save_post: "Save post"
|
140
143
|
search: "Search"
|
144
|
+
search_feed: "Search Results Feed"
|
141
145
|
search_form:
|
142
146
|
forum_label: "In this discussion category"
|
143
147
|
person_label: "From this person"
|
144
148
|
query_label: "Look for this text"
|
145
|
-
search_whole_forum: "search the whole forum"
|
146
149
|
search_header: "Forum Search"
|
147
150
|
search_introduction: "Please choose a search phrase and/or a person or discussion category."
|
148
151
|
search_results: "Search Results"
|
152
|
+
search_whole_forum: "search the whole forum"
|
149
153
|
separator: ':'
|
150
154
|
showing: "showing"
|
151
155
|
sorry_locked: "Sorry: this topic is locked."
|
data/forum_extension.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require_dependency 'application_controller'
|
2
2
|
|
3
3
|
class ForumExtension < Radiant::Extension
|
4
|
-
version "2.0.
|
4
|
+
version "2.0.7"
|
5
5
|
description "Nice clean forums and page comments for inclusion in your radiant site. Requires the reader extension and share_layouts."
|
6
6
|
url "http://spanner.org/radiant/forum"
|
7
7
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-forum-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 7
|
10
|
+
version: 2.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- spanner
|