radiant-forum-extension 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.6
1
+ 2.0.7
@@ -24,6 +24,9 @@
24
24
  - content_for :pagination do
25
25
  = pagination_and_summary_for(@forums, t('forum'))
26
26
 
27
+ - content_for :feedurl do
28
+ = forums_path(:format => :rss)
29
+
27
30
  - content_for :feedlink do
28
31
  = feed_link(forums_path(:format => :rss))
29
32
 
@@ -16,6 +16,9 @@
16
16
  - content_for :pagination do
17
17
  = pagination_and_summary_for @topics, 'topics'
18
18
 
19
+ - content_for :feedurl do
20
+ = forum_path(@forum, :format => :rss)
21
+
19
22
  - content_for :feedlink do
20
23
  = feed_link(forum_path(@forum, :format => :rss))
21
24
 
@@ -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
- - url_parts = {:format => :rss}
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
- xml.title "#{@site_title} : Latest posts"
8
- xml.description "Latest posts in any topic or forum"
9
- xml.link posts_url
10
- xml.language "en-us"
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
@@ -23,6 +23,9 @@
23
23
  - content_for :title do
24
24
  = t('topics_heading')
25
25
 
26
+ - content_for :feedurl do
27
+ = topics_url(:format => :rss)
28
+
26
29
  - content_for :feedlink do
27
30
  = feed_link(topics_url(:format => :rss))
28
31
 
@@ -4,10 +4,10 @@ xml.channel do
4
4
  :rel => 'self', :type => 'application/rss+xml'
5
5
  }
6
6
 
7
- xml.title "#{@site_title} : Discussions most recently updated"
8
- xml.description "The latest new and updated topics"
7
+ xml.title "#{@site_title} : #{t('latest_topics')}"
8
+ xml.description t("latest_topics_description")
9
9
  xml.link topics_url
10
- xml.language "en-us"
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, most recently from #{@posts.last.reader.name} on #{@posts.last.created_at.to_s(:informal)}"
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 "en-us"
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}
@@ -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 comments"
71
- latest_topics: "all the latest topics"
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.6"
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
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{radiant-forum-extension}
8
- s.version = "2.0.6"
8
+ s.version = "2.0.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["spanner"]
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: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 6
10
- version: 2.0.6
9
+ - 7
10
+ version: 2.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - spanner