# speed_comment.rb # # spped_comment: 最新・月毎表示時に簡易なツッコミフォームを表示する # pluginディレクトリに入れるだけで動きます。 # # Copyright (c) 2002 TADA Tadashi # Distributed under the GPL2 or any later version. # =begin ChangeLog 2003-09-24 TADA Tadashi * support cookie for name. * support conf_proc. 2002-03-24 TADA Tadashi * suppress output in mobile mode. 2002-03-12 TADA Tadashi * support insert into @header. =end add_body_leave_proc do |date| if /latest|month/ =~ @mode @conf['speed_comment.name_size'] = 20 unless @conf['speed_comment.name_size'] @conf['speed_comment.body_size'] = 40 unless @conf['speed_comment.body_size'] r = "" r << %Q[

] r << %Q[] r << %Q[] r << %Q[#{h( comment_name_label )} : ] r << %Q[#{h( comment_body_label )} : ] r << %Q[] r << %Q[

] else '' end end unless @resource_loaded then def speed_comment_label '簡易ツッコミ' end def speed_comment_html <<-HTML

簡易ツッコミフォームのサイズ

名前欄:

本文欄:

HTML end end add_conf_proc( 'speed_comment', speed_comment_label ) do if @mode == 'saveconf' then @conf['speed_comment.name_size'] = @cgi.params['speed_comment.name_size'][0].to_i @conf['speed_comment.name_size'] = 20 if @conf['speed_comment.name_size'] < 1 @conf['speed_comment.body_size'] = @cgi.params['speed_comment.body_size'][0].to_i @conf['speed_comment.body_size'] = 40 if @conf['speed_comment.body_size'] < 1 end speed_comment_html end # Local Variables: # mode: ruby # indent-tabs-mode: t # tab-width: 3 # ruby-indent-level: 3 # End: