# en/category-legacy.rb # # Copyright (c) 2004 Junichiro KITA # Distributed under the GPL2 or any later version. # def category_title info = Category::Info.new(@cgi, @years, @conf) mode = info.mode case mode when :year period = "#{info.year}" when :half period = (info.month.to_i == 1 ? "1st half" : "2nd half") period = "#{info.year} #{period}" if info.year when :quarter period = info.month period = "#{info.year}/#{period}" if info.year when :month period = info.month.to_i period = "#{info.year}/#{period}" if info.year end period = " (#{period})" if period "[#{info.category.join('|')}#{period}]" end def category_init_local @conf['category.prev_year'] ||= '<< ($1)' @conf['category.next_year'] ||= '($1) >>' @conf['category.prev_half'] ||= '<< ($1-$2)' @conf['category.next_half'] ||= '($1-$2) >>' @conf['category.prev_quarter'] ||= '<< ($1-$2)' @conf['category.next_quarter'] ||= '($1-$2) >>' @conf['category.prev_month'] ||= '<< ($1-$2)' @conf['category.next_month'] ||= '($1-$2) >>' @conf['category.this_year'] ||= 'this year' @conf['category.this_half'] ||= 'this half' @conf['category.this_quarter'] ||= 'this quarter' @conf['category.this_month'] ||= 'this month' @conf['category.all_diary'] ||= 'all diary' @conf['category.all_category'] ||= 'all category' @conf['category.all'] ||= 'all diary/all category' end category_init_local @category_conf_label = 'Category' def category_conf_html r = <Create category index

To use the category feature, you should create category index. Check the box below to create category index.

It takes several or several tens of second to create it.

Edit Support

Category names can be shown under the 'Article' form.

Display Order

Default period

Specify the default display period for category view.

Header 2

Inserted under the <H1>.

Button labels

Specify button labels. $1 and $2 in labels are replaced with year and month.

HTML [ ['previous year', 'category.prev_year'], ['next year', 'category.next_year'], ['previous half', 'category.prev_half'], ['next half', 'category.next_half'], ['previous quarter', 'category.prev_quarter'], ['next quarter', 'category.next_quarter'], ['previous month', 'category.prev_month'], ['next month', 'category.next_month'], ['this year', 'category.this_year'], ['this half', 'category.this_half'], ['this quarter', 'category.this_quarter'], ['this month', 'category.this_month'], ['all diary', 'category.all_diary'], ['all category', 'category.all_category'], ['all diary/all category', 'category.all'], ].each do |button, name| r << < HTML end r << < HTML end @category_icon_none_label = 'no icon' @category_icon_conf_label = 'Category Icons' def category_icon_conf_html r = '' unless @conf.secure r << <Location of category icons

Specify the directory and url of category icons.

Directory:
URL:


HTML end str = '' @categories.each do |c| str << %Q|\t\n\t\t\n\t\t\n\t\n| end <Category Icons

button namelabelsample
#{button}

#{h @conf[name].sub(/\$1/, "2007").sub(/\$2/, "2")}

#{c}\n| str << category_icon_select(c) str << %Q|| if @category_icon[c] str << %Q|
#{str}
CategoryIcon


Sample icons

You can take your choice from these icons. Move mouse pointer on an icon, the icon's name will pop up.

#{category_icon_sample}

HTML end # Local Variables: # mode: ruby # indent-tabs-mode: t # tab-width: 3 # ruby-indent-level: 3 # End: # vim: ts=3