ユーザー情報表示プラグイン
freoに登録されている各ユーザーのID、権限など、ユーザーテーブルに登録されている情報を取得・表示するプラグインです。
特徴
- freoに登録されている各ユーザーのID、権限など、ユーザーテーブルに登録されている情報を取得・表示するプラグインです。
- 管理ページ以外の画面で情報を取得・表示することができます。
- [freo/index.php/profile/ユーザーID]で表示できる情報を、他の画面でも取得・表示します。
ダウンロード
導入方法
- 上記ファイルをDLして解凍する。
- [freo]フォルダに[freo]フォルダをアップロードする。
- ユーザー数に関する情報を表示したいテンプレートに下記内容を挿入してアップデートする。
- 正常に表示されればOK。
ユーザー数表示用テンプレート編集例
ユーザーを一覧表示する
- ユーザーを表示させたいテンプレートに、下記のように記述してください。
<table summary="ユーザー情報">
<thead>
<th>ID</th>
<th>登録日</th>
<th>更新日</th>
<th>承認</th>
<th>権限</th>
<th>名前</th>
<th>メールアドレス</th>
<th>URL</th>
<th>紹介文</th>
</thead>
<tbody>
<!--{foreach from=$plugin_user_alls|smarty:nodefaults item='plugin_user_all'}-->
<tr>
<td>{$plugin_user_all.id}</td>
<td>{$plugin_user_all.created|date_format:'%Y/%m/%d'}</td>
<td>{$plugin_user_all.modified|date_format:'%Y/%m/%d'}</td>
<td>{$plugin_user_all.approved}</td>
<td>{$plugin_user_all.authority}</td>
<td>{$plugin_user_all.name}</td>
<td>{$plugin_user_all.mail}</td>
<td>{$plugin_user_all.url|autolink}</td>
<td>{$plugin_user_all.text|nl2br}</td>
</tr>
<!--{/foreach}-->
</tbody>
</table>
ユーザーを個別に表示する
- たとえば、ID[test]のユーザー情報を表示したい場合
<ul> <li>ID:{$plugin_user_alls.test.id}</li> <li>登録日:{$plugin_user_alls.test.created|date_format:'%Y/%m/%d'}</li> <li>更新日:{$plugin_user_alls.test.modified|date_format:'%Y/%m/%d'}</li> <li>承認:{$plugin_user_alls.test.approved}</li> <li>権限:{$plugin_user_alls.test.authority}</li> <li>名前:{$plugin_user_alls.test.name}</li> <li>メールアドレス:{$plugin_user_alls.test.mail}</li> <li>URL:{$plugin_user_alls.test.url|autolink}</li> <li>紹介文:{$plugin_user_alls.test.text|nl2br}</li> </ul> - また、たとえばエントリーを投稿したユーザー($entry.user_id)のユーザー情報を表示したい場合
<ul> <li>ID:{$plugin_user_alls[$entry.user_id].id}</li> <li>登録日:{$plugin_user_alls[$entry.user_id].created|date_format:'%Y/%m/%d'}</li> <li>更新日:{$plugin_user_alls[$entry.user_id].modified|date_format:'%Y/%m/%d'}</li> <li>承認:{$plugin_user_alls[$entry.user_id].approved}</li> <li>権限:{$plugin_user_alls[$entry.user_id].authority}</li> <li>名前:{$plugin_user_alls[$entry.user_id].name}</li> <li>メールアドレス:{$plugin_user_alls[$entry.user_id].mail}</li> <li>URL:{$plugin_user_alls[$entry.user_id].url|autolink}</li> <li>紹介文:{$plugin_user_alls[$entry.user_id].text|nl2br}</li> </ul>
更新履歴
| 2014/12/19 | 配布開始 |