From: TADA T. <sh...@sp...> - 2006-09-13 09:43:02
|
ただただしです。 こちらも長いこと放置してしまってすみません。パッチを読みました。 06/07/22 に ToshiOkada<to...@js...> さんは書きました: > 早速ですが,Subjectのとおり絵日記プラグインを改造して,ブラウザ上の設 > 定画面から設定可能なようにしてみました。 何を設定画面から指定可能にして、何をtdiary.confでのみ設定可能と するか、今まで漠然と決めていたんですが、整理しようと思います。もち ろん、この原則から外れているプラグインもあると思うので、是正してい きたいと思います。 * ファイルのパスに関する設定(特に書き込み系)はtdiary.confのみとす る。これは主にセキュリティ上の観点から。 * セキュアモードで設定させると不都合のあるものは原則として設定画 面に登場させない(これは例外アリ。オプションで表示/非表示を可能 にするなど)。 * 逆にセキュアモードのみを対象にしたオプションも設定画面には登場 させない(意味がないから)。 image.rbの場合、保存先のパスなどの設定は最初の原則に従って、 tdiary.conf上でのみ指定可能にすべきと考えます。 また、画像の枚数やサイズは、レンタル日記を対象にしたものなので、 非セキュアモード下で設定するのは意味がありません。 というわけで、image.rbの設定画面は現在の仕様がいいバランスだと 私は考えているのですが、いかがでしょうか。 > 添付のパッチを実行すると,既存の image.rb,zh/image.rbが改変され, > en/image.rbが新たに作成されます。 あれ? en/image.rbはすでにあると思いますが……。 > また,添付のパッチでは上記機能の他に,絵日記プラグインに組み込まれてい > る,画像の縦横サイズ情報を自動的に取得する機能の有効/無効を切り替えるス > イッチとして,@options['image.viewsize'](=true|false) というオプションを > 追加してあります。こちらはホントに場当たり的なパッチで,恥ずかしながらソー > スは汚い(ってか幼稚)です( view_sizeが falseなら png,gif,jpeg各画像のサイ > ズ情報取得動作(unpack)の手前で単純にリターンさせているだけです。)。 > > 私自身では無いのですが,とある知人の環境下にてレタッチ加工されたJPEG画 > 像で "時々" この絵日記プラグインのサイズ情報取得動作がうまくいかずにエラー > となり,アップロード出来ないという現象が起こっておりまして,その不具合を > 回避するために付加したスイッチです。 こういう意図なら、そのエラーをちゃんと捕まえてよきにはからうとか、 その手の画像でもエラーにならないようなサイズ取得アルゴリズムを 考えるとかすべきだと思います。オプションで逃げるのは最後の手段 でしょう。 まずは、どのようなエラーが出るのか見せていただけませんか。もし くは、エラーになる画像を提供していただいてもかまいません。 > 絵日記って英語でなんと言うのでしょうね?。ってか,そもそも英語圏で絵日 > 記というモノが存在するのかどうかすら私には謎でして(笑 > 私は単純に a picture diaryとしてしまいましたが,あとで zh/image.rbを覗 > いてみたら,image diaryと既に書いてあって,さてホントはどう英語に現した > らこのプラグインの意味(機能)が分かりやすいだろうか??,と,密かに悩んでお > ります(笑 goo辞書では「a (child's) picture diary」ですねぇ。childって……。 -- ただただし <http://sho.spc.gr.jp/> ♪ツッコミは、短く鋭く愛を込めて。 |