Categories
WordPress Plugins

HTML タグの制約を一部緩和する一点物プラグイン

一点物プラグインとは

プラグインには一般向けで汎用的なプラグインと一点物のプラグインの2種類があります。一般向けは一般的なニーズに合わせて作るもので、ある程度ニーズの幅に対応できるように作らなくてはいけません。一点物はある特定のケースだけを想定して作るもので、そのケースをピンポイントに解決できればそれでいいというものです。普通、プラグインといえば一般向けのものを指します。

一般向けのプラグインを作る場合、ニーズに幅があることを考慮して作らないといけないので、「こういう機能が欲しい人もいるかもしれない」とか、「こういうデータも入力されるかもしれない」とか、いろいろと心配が多くなります。いきおいコードは複雑になってしまいます。

一方、一点物はどうかというと、極めてシンプルに作ることができます。対応する必要のある状況は特定されているので、オプションを設定するための UI を用意する必要もないわけです。

これまで、求められる状況に応じて一点物のプラグインをいくつか作ってきました。一般向けではないので公開したりはしてきませんでした。ふと思い立って、これからは一点物のプラグインも公開することにしました。一点物ならシンプルに作れるので、これから WordPress のプラグインを作りたいと考えている人にとって良い教材になるだろう思ったからです。

個人的な意見ですが、コアのコードに手を入れるのは極力避けるべきです。どこをどう変更したのか忘れますし、バージョンアップのたびに同じ変更を行なわなければならなくなります。変更はプラグインで行なうべきです。プラグインなら必要がなくなれば無効化すればいいだけです。

欲しい機能を持ったプラグインが探しても見つからないかもしれません。無いなら作ればいいのです。ここで紹介するプラグインを参考に、自作プラグインに挑戦してみてください。

Categories
WordPress Plugins

Tam-attachment

I’m busy now. Current version of tam-attachment does not work on WordPress 2.1, but I don’t have time to fix it until March. We’re sorry for the inconvenience.

現行バージョンの tam-attachment は WordPress 2.1 上で機能しません。すぐに直したいのですがしばらく多忙のため3月以降になるまで対応できません。不都合をおわびします。

» 日本語

Summary

Tam-attachment is a WordPress plugin which adds some powerful functionality to native file attachments mechanism. This plugin allows you to edit file title and description at any time, not only at file uploading time. And also it offers a couple of useful features like …

  • Original thumbnail
    You know WordPress takes care of making thumbnail image by scaling original one down automatically. But when the file isn’t an image, WP can’t do that. Tam-attachment’s original thumbnail feature allows you to upload your favorite image as extra thumbnail.
  • After attachment
    When you want to upload big size file like movies, it may over PHP’s limit of upload file size. Then you resignedly upload it via FTP, but FTP uploading can’t make attachment entry on WordPress DB, so the file gets orphaned. Tam-attachment’s after attachment feature help you dig the orphan files up and create attachment entry for them.
  • Tagging
    You can tag the attachments by words. You can also pick up all attachments with specific tag, so it’s useful for grouping attachments.

The plugin has own good-looking edit panels similar to the familiar Post and Page edit panels. You can edit slags, order, discussion settings, password, parent post and custom fields on it.

Tam-attachment screenshot

Categories
WordPress Plugins

Nippon plugin

注意: このプラグインと tenpura さんによる WP Multibyte Patch を同時に有効にしているとコンフリクトを起こすことが確認されています。WP Multibyte Patch はメールの文字化け回避のほか、WordPress で日本語を正しく処理するために必要となる修正を網羅しているので、WP Multibyte Patch の使用をおすすめします。(2007/11/21 追加)

» 日本語

Summary

This is a plugin for Japanese WordPress users.

This plugin fixes some trouble which users in Japanese environment often face with pure WordPress, like garbles of non-ASCII characters. For now, its ability is just to fix mail garble though, another function will be added when needed.

When you have non-ASCII characters in mail header like Subject: or From:, you must encode them Base64 before you send, but in default WordPress installation wp_mail() does not encode them. It seems that this causes the Japanese character garble problem. Nippon plugin redefines wp_mail() as able to handle encoding process.

This plugin uses mbstring functions inside, so unless your PHP setting activates mbstring module, it’s no use.

Update: Notice: Please do not use this plugin with WordPress 2.2 or greater because it bypasses phpMailer. You can use Nippon 2 plugin with the greater versions.