root/platform/tdiary/plugin/makerss_comment.rb

Revision 3279, 0.7 kB (checked in by hsbt, 12 months ago)

platform/tdiary/plugin: changed directory rule.

Line 
1#
2# makerss_comment.rb: extension for makerss plugin.
3#
4# Copyright (C) 2007 by SHIBATA Hiroshi <h-sbt@nifty.com>
5# Distributed under GPL2.
6#
7
8class MakeRssComments < MakeRssFull
9        def title
10                '(comments only)'
11        end
12       
13        def item( seq, body, rdfsec )
14                return if rdfsec.section.respond_to?( :body_to_html )
15                super
16        end
17       
18        def file
19                f = @conf['makerss.no_comments.file'] || 'comments.rdf'
20                f = 'comments.rdf' if f.length == 0
21                f
22        end
23       
24        def write( encoder )
25                super( encoder )
26        end
27       
28        def url
29                u = @conf['makerss.no_comments.url'] || "#{@conf.base_url}comments.rdf"
30                u = "#{@conf.base_url}comments.rdf" if u.length == 0
31                u
32        end
33end
34
35@makerss_rsses << MakeRssComments::new( @conf )
Note: See TracBrowser for help on using the browser.