public
Description: This contains various plugins for Feather
Clone URL: git://github.com/eldiablo/feather-plugins.git
Search Repo:
Click here to lend your support to: feather-plugins and make a donation at www.pledgie.com !
Add Atom Feeds to head and sidebar
cypher (author)
Thu May 01 06:53:29 -0700 2008
commit  8fad2b0febcdaec82b336cd8cf174685204ede47
tree    b7d3b23c451bf04ac543022524f8e2f3a9d2300d
parent  d8332e314c521dbe05f558c67094dd484440b504
...
1
2
3
 
4
5
 
6
7
8
...
1
2
 
3
4
 
5
6
7
8
0
@@ -1,8 +1,8 @@
0
 module Merb
0
   module GlobalHelpers
0
- def feed_url
0
+ def feed_url(format = "rss")
0
       feed_settings = FeedSetting.current
0
- (feed_settings.external_feed_url.nil? || feed_settings.external_feed_url == "") ? "http://#{request.env['HTTP_HOST']}/articles.rss" : feed_settings.external_feed_url
0
+ (feed_settings.external_feed_url.nil? || feed_settings.external_feed_url.empty?) ? "http://#{request.env['HTTP_HOST']}/articles.#{format}" : feed_settings.external_feed_url
0
     end
0
   end
0
 end
...
1
 
 
...
 
1
2
0
@@ -1,2 +1,3 @@
0
-<link rel="alternate" type="application/rss+xml" title="<%= Configuration.current.title %>" href="<%= feed_url %>"/>
0
+<link rel="alternate" type="application/rss+xml" title="<%= Configuration.current.title %> (RSS)" href="<%= feed_url %>"/>
0
+<link rel="alternate" type="application/atom+xml" title="<%= Configuration.current.title %> (Atom)" href="<%= feed_url("atom") %>"/>
...
1
2
3
4
 
5
6
7
 
8
9
10
...
1
2
3
 
4
5
6
 
7
8
9
10
0
@@ -1,10 +1,10 @@
0
 <div id="feed-link">
0
   <h3>Syndicate</h3>
0
   <!-- <= image_tag 'feed_icon.png' > -->
0
- <a href="<%= feed_url %>">Articles</a>
0
+ Articles: (<a href="<%= feed_url %>">RSS</a>|<a href="<%= feed_url('atom') %>">Atom</a>)
0
   <br />
0
   <% if defined?(Comment) && is_plugin_active("feather-comments") %>
0
- <a href="http://<%= request.env['HTTP_HOST'] %>/comments.rss">Comments</a>
0
+ Comments: (<a href="http://<%= request.env['HTTP_HOST'] %>/comments.rss">RSS</a>|<a href="http://<%= request.env['HTTP_HOST'] %>/comments.atom">Atom</a>)
0
   <br />
0
   <% end %>
0
 </div>

Comments

    No one has commented yet.