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