WordPress Usermeta Extender

MTS Usermeta Extender for WordPress

WordPress の ベスト「2009 オープンソースCMS賞」受賞おめでとうございます。

自分が最近 WordPress を使い始めたのも、まさに CMS としての利用にあります。そして、ここで公開させていただくプラグインも、今後の CMS 利用に幅を持たせる目的があります。

ブログとしての WordPress なら、内容はともかく、投稿した情報を見てもらう事が最大の目的となります。一方、CMS として利用する場合、投稿した情報を内容に合わせて閲覧制限したり、ブログデータの性質とは異なる商品データやスケジュールデータを取り扱ったりするでしょう。そんなとき必ず欲しいと思うのが、ユーザー管理です。商売で利用するなら、顧客管理になると思います。

そんなとき、本プラグインの利用をお勧めしたいと思います。このプラグインは、WordPress の持つユーザーの付加情報を登録するデータベースの「usermeta」テーブルに、「キーと値」の関係で情報を追加・編集するためのプラグインです。

毎回の言い訳で恐縮ですが、国際化対応しており、間違ってダウンロードしてしまった外人さんのために英文併記させていただきました。稚拙な英文のため、誤った表記などご指摘いただければ幸いです。

バグの報告、誤りの指摘はもとより、機能追加要望、励ましのコメント大歓迎です(^o^)。また、協業、テンプレート変更などお声掛け下されば出来る限り対応いたします m(_ _)m。

Congraturations! on 2009 Open Source CMS Awards.

This plugin enables to add or edit usermeta data. If you want to add a user’s other property, it’s easy to add using this plugin. After adding a new property, it’s able to get using functions of this plugin, or you can use WordPress functions.

If you see any bugs or strange English, advicing me is welcomed. Thank you (^o^)/.

インストール – Installation

下のリンクからダウンロードし、解凍後、「mts-usermeta-extender」フォルダごと「wp-content/plugins」ディレクトリーへアップロードして下さい。管理画面からプラグインを「使用する」に切り替えると利用できるようになります。

Download the zip file from the following link. After expand the zip file, upload mts-usermeta-folder in WordPress plugin directory ‘wp-content/plugins’. Change to enable this plugin, then this plugin’s feature are available to use.

ユーザーメタデータの追加編集 – Add, Edit of new usermeta data

管理画面からユーザー編集かプロファイル編集を選択すると編集画面の下部に、以下のようにメタデータの拡張フォームが追加されます。キー名称はシステムの事を考え、アスキー文字を利用するとトラブルになり難いと思います。追加は、このプラグインで用意した追加ボタンを使って下さい。追加すると、その次の画面のように表示されます。編集、削除も同様、このプラグインで用意したボタンを使ってください。処理は Ajax で行われます。

The plugin’s form is added to the end of profile page of control like above. A usermeta data is a combination with a key name and value. Type a key name and value, then ‘Add data’ button of this plugin’s form button. After added new usermeta data, it’s displayed like after graphic.

As same as using ‘Add data’ button, use ‘Save edit’ and ‘Delete’ buttons of this plugin. These processing are used Ajax.

設定 – Configuration

このプラグインをインストールすると、管理画面のユーザーメニューに「設定」サブメニューが追加されます。このページを表示すると以下のようなページが表示されます。もしあなたのサイトで、訪れた人が新規ユーザー登録できるようにしている場合、その新規ユーザーに設定するユーザーメタデータを「キー名称=ユーザーメタデータ」の形式で設定しておくことで、新規登録と同時にユーザーメタデータの登録も行えるようになっています。使用しないばあは、空白として下さい。

Above graphic is the page when the sub menu of Users of control is opened. This is data to add usermeta data with when new users regist their new name and mail address. If you are not allow to add new user themselves, it’s not needed to set any data. If you not need any initial data to new users, set nothing in it.

アンインストール – Uninstall

プラグインの利用を止めたとき、プラグインの削除を行うと、usermeta テーブルに登録されたデータがすべて削除されます。

If you uninstall this plugin using plugin page of controll, all data you saved using this plugin will be deleted.

使い方 – How to use on your template

テンプレート上に登録したユーザーメタデータを表示したいときは、本プラグインで用意してありますテンプレート関数「mtsue_get_usermeta()」を利用して、表示(echo=1)または取得(echo=0)ができます。

<?php mtsue_get_usermeta('key=twitter'); ?>

or

<?php $twitter = mtsue_get_usermeta('key=twitter&echo=0'); ?>

When you use the data you were saved, call the function ‘mtsue_get_usermeta()’ of this plugin. Examples are above.

(091121)


WordPress 2.8.6
Download: [link_download_file filename=”mts-usermeta-extender-0.5.0.zip”]