unless @conf.mobile_agent? then def permalink(date, index, escape = true) ymd = date.strftime("%Y%m%d") uri = @conf.index.dup uri[0, 0] = @conf.base_url unless %r|^https?://|i =~ uri uri.gsub!(%r|/\./|, '/') if escape then uri + CGI::escape(anchor("#{ymd}p%02d" % index)) else uri + anchor("#{ymd}p%02d" % index) end end add_section_enter_proc do |date, index| @category_to_tag_list = {} @subtitle_h = Hash.new{|hash, key| hash[key] = {}} end alias subtitle_link_original subtitle_link def subtitle_link(date, index, subtitle) s = '' if subtitle then s = subtitle.sub(/^(\[([^\[]+?)\])+/) do $&.scan(/\[(.*?)\]/) do |tag| @category_to_tag_list[tag] = false # false when diary end '' end old_apply_plugin = @conf['apply_plugin'] @conf['apply_plugin'] = true r = apply_plugin(s.sub(@conf.section_anchor, ''), true) @conf['apply_plugin'] = old_apply_plugin @subtitle_h[date][index] = "#{r.strip} - #{@conf.html_title} (#{date.strftime("%Y-%m-%d")})".gsub(/'/){"\\'"} end subtitle_link_original(date, index, s.strip) end add_section_leave_proc do |date, index| r = '
' if @category_to_tag_list and not @category_to_tag_list.empty? then r << "Tags: " @category_to_tag_list.each do |tag, blog| if blog r << %Q|#{tag} | else r << category_anchor("#{tag}").sub(/^\[/, '').sub(/\]$/, '') << ' ' end end end r << addclips(date, index) r << add_permalink(date, index) r << "
\n" end def addclips(date, index) section_footer_addclips_init r = " | " r << <<-HTML HTML end def add_permalink(date, index) r = " | " r << %Q|Permalink | end end def section_footer_addclips_init @conf['section_footer_addclips.Type'] = 0 unless @conf['section_footer_addclips.Type'] @conf['section_footer_addclips.Bcolor'] = '78BE44' unless @conf['section_footer_addclips.Bcolor'] @conf['section_footer_addclips.Ncolor'] = 'D1E9C0' unless @conf['section_footer_addclips.Ncolor'] @conf['section_footer_addclips.Tcolor'] = '666666' unless @conf['section_footer_addclips.Tcolor'] @conf['section_footer_addclips.Id'] = '0000000000000' unless @conf['section_footer_addclips.Id'] end add_conf_proc('section_footer_addclips', 'section_footer_addclips') do if @mode == 'saveconf' then @conf['section_footer_addclips.Type'] = @cgi.params['section_footer_addclips.Type'][0].to_i @conf['section_footer_addclips.Bcolor'] = @cgi.params['section_footer_addclips.Bcolor'][0] @conf['section_footer_addclips.Ncolor'] = @cgi.params['section_footer_addclips.Ncolor'][0] @conf['section_footer_addclips.Tcolor'] = @cgi.params['section_footer_addclips.Tcolor'][0] @conf['section_footer_addclips.Id'] = @cgi.params['section_footer_addclips.Id'][0] else section_footer_addclips_init end r = '' r << <<-HTML

ボタンの種類

使用するボタンの種類をお選び下さい。

HTML for tr in [0, 2, 5, 3, 4] do checked = '' checked << %Q| checked="checked"| if tr == @conf['section_footer_addclips.Type'] r << %Q| | end r << <<-HTML

パーツの色

パーツの色を指定できます。HTMLやCSSと同じ、6桁の16進数で指定します。

Bcolor  
Ncolor  
Tcolor  

ID

HTML end