« MT画像管理ツールプラグイン_1 | メイン | ドメイン指定事業者変更(引っ越し) »
2007年01月20日
MT画像管理ツールプラグイン_2 |
MovableTypeに画像管理系のプラグインをインストールする続き...
昨日の失敗?を、気を取り直して? 別のプラグイン作戦
Zip file upload for MT
複数ファイルアップロード(圧縮ファイルUP&解凍)のできるいっぴん。
http://www.sixapart.jp/techtalk/2006/10/mt_plugin_zip-file-upload.html
mt-zipupload-0.02.zipをダウンロード。Windows上で解凍
ZipUnloadディレクトリをサーバのplugins ディレクトリに転送
外部モジュールとして「Archive::Zip」が必要なので、CPAN から取得。
http://search.cpan.org/~adamk/Archive-Zip-1.18/lib/Archive/Zip.pm
$ tar zxf Archive-Zip-1.18.tar.gz
$ cd Archive-Zip-1.18
$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Compress::Zlib 1.14 not found.
Warning: prerequisite File::Which 0.05 not found.
Writing Makefile for Archive::Zip
$ make
$sudo make install
Compress::ZlibとFile::Whichもいるようだな。
Compress::Zlib
http://search.cpan.org/~pmqs/Compress-Zlib-2.003/
$ tar zxf Compress-Zlib-2.003.tar.gz
$ cd Compress-Zlib-2.003
$ perl Makefile.PL
Up/Downgrade not needed.
Checking if your kit is complete...
Looks good
Warning: prerequisite Compress::Raw::Zlib 2.003 not found.
Warning: prerequisite IO::Compress::Base 2.003 not found.
Warning: prerequisite IO::Compress::Base::Common 2.003 not found.
Warning: prerequisite IO::Compress::Gzip 2.003 not found.
Warning: prerequisite IO::Compress::Gzip::Constants 2.003 not found.
Warning: prerequisite IO::Uncompress::Base 2.003 not found.
Warning: prerequisite IO::Uncompress::Gunzip 2.003 not found.
Writing Makefile for Compress::Zlib
げげ、ほかにもいろいろいるのねー。
http://search.cpan.org/~pmqs/Compress-Raw-Zlib-2.003/
http://search.cpan.org/~pmqs/IO-Compress-Base-2.003/
http://search.cpan.org/~pmqs/IO-Compress-Zlib-2.003/
File::Which
http://search.cpan.org/~pereinar/File-Which-0.05/
$ tar zxf File-Which-0.05.tar.gz
(ry
再度Archive::Zip make
やっと準備完了。 MTの管理画面のプラグインに「zip file upload バージョン 0.2 This plugin adds support of zip file upload to MovableType.」が出てきた。
ZIPファイルなりを放り込むと、自動解凍されるらしい。
「ファイルのアップロード」画面を開くと、ファイル[参照]の下部に「Extract on server」というチェックボックスが出現するらしいのだが、NotFound。プラグインは有効になっているようだがどういうことだろうか。
別の話題:
画像を投げ込むときは リサイズしないといけないのだが これが毎回面倒至極。MTに自動リサイズのプラグインがあるようだ。
FieldThumb。
http://yusukebe.com/tech/archives/20061130/193256.html
RightFieldsというプラグインを利用しているらしい。まずはRightFieldsプラグインをインストール。おやおや、この作者はBigPAPIプラグインと同じ人のようだ。
RightFieldsプラグインのインストールはちょっと面倒だ。
Installing RightFieldsTo install RightFields, download RightFields.tar.gz and decompress it on your hard drive. This will result in a directory called RightFields-[version]. The directories within this correspond to directories in the MT directory on your server.
Open the plugins directory. Upload the entire RightFields directory to the plugins directory on your server.
If you're using dynamic publishing, open the php/plugins directory. Upload all the files in that directory to the php/plugins directory on your server.
Finally, change the permissions on the file plugins/RightFields/mt-rightfields.cgi to 755 to make this script executable.
RightFields.tar.gzを解凍すると、RightFields-1.13というディレクトリが得られる。
このディレクトリの構成は以下の通り
RightFields-1.13
+php
+plugins
+plugins
+RightFields
+RightFieldsDoc.txt
・plugins内のRightFieldsディレクトリをサーバのpluginsディレクトリへ転送。
・php\plugins内の全ファイルをサーバのphp/pluginsディレクトリへ転送(PHPを使用している場合のみ)
・plugins/RightFields/mt-rightfields.cgiに実行権限(755)を付与する。
#sixapart社のサイトに日本語のドキュメントがあった(/_;)
http://www.sixapart.jp/movabletype/plugins/rightfields.html
準備完了。
FieldThumbプラグインは、Path::Classを使用しているようだ。例の通りCPANからインストール。
http://search.cpan.org/~kwilliams/Path-Class-0.16/
sub pre_save_hdlr{ にて
"}" の閉じ忘れがあり、プラグインを認識できなかったなりよー。
だめぽ。
#とりあえずsub make_thumbnail{の直前に入れてみるテスト。
結局のところ、リサイズはMTでやらないほうがよさそう。
Windows用のリサイズ機能フリーソフトを検索。
ドラッグ&ドロップで複数の画像を高速かつ比較的高品質にリサイズする、横幅やリサイズ後のファイル名は自分で設定できる、といった条件。
3つ候補がヒットした。
・縮小専用。
・藤 -Resizer-
・ドラッグ&ドロップ画像変換
結局のところは、「縮小専用。」を採用した。今後は「画像は後日」が減るといいなあ。
ヤフオクでJAL株主優待券が運良く安値(2750円/枚)で落札。
2024:
投稿者 onsenfan [ Linuxサーバ, PC・インターネット ] : 2007年01月20日 23:00
この記事が役に立った/おもしろいと思ったら、ワンクリックで応援お願いしますトラックバック
このエントリーのトラックバックURL:
https://blog.odorokutamegoro.com/mt-tb.cgi/1756_1262512181657