# $Revision:0.1$ # rating.rb: 複数軸による記事評価とグラフ表示 # for tDiary # # 使い方 # そのまま plugin ディレクトリに置きます。 # '設定' -> 'rating.rb Configuration' で、評価軸や # 表示内容を設定。 # くわしくは # http://www.maripo.jp/diary/?date=20071019 # # Copyright (c) 2007 Mariko/Maripo GODA # http://www.maripo.jp/ # You can redistribute it and/or modify it under GPL. require 'pstore' require 'cgi' @dbase = "#{@cache_path}/rating.db" ######################################### # Config (Form) ######################################### add_conf_proc('rating', 'rating.rb Configuration') do rating_config = RatingConfig.new(@dbase) form_string = "" if @mode == 'saveconf' # save conf index = 0 # edit axes rating_config.each { |axis_config| #check values if (@cgi.params["label" + index.to_s][0] != "" && (@cgi.params["range" + index.to_s][0]).to_i > 0) axis_config.edit(@cgi.params["label" + index.to_s][0], @cgi.params["label_max" + index.to_s][0],@cgi.params["label_min" + index.to_s][0],@cgi.params["range" + index.to_s][0].to_i,@cgi.params["order" + index.to_s][0].to_i,@cgi.params["display" + index.to_s][0]!=nil) index += 1 end } if (@cgi.params["label_new"][0] != "" && @cgi.params["range_new"][0].to_i > 0) # add new axis rating_config.add_axis(@cgi.params["label_new"][0], @cgi.params["label_max_new"][0], @cgi.params["label_min_new"][0], @cgi.params["range_new"][0].to_i) end rating_config.save_to_db end # print conf form form_string += < フィードバックフォームの設定をします。軸はいくつでも作成することができます。

作者blog に追加情報が書いてあるかもしれません。

設定方法