プロフィール拡張プラグイン

このプラグインについて

ユーザーの追加情報として、追加プロフィール(「フリガナ」「イメージ」「タグ」「カテゴリ」「任意のファイル10個まで」「任意のテキスト10項目まで」)を登録することができます。また、訪問者向けにプロフィール一覧ページを表示することもできます。

プロフィール拡張プラグイン

広告

ダウンロード

以下のリンクからプラグインをダウンロードできます。(GitHubに遷移します。)

GitHubの緑ボタン「Code」内にある「Download ZIP」からすべてのプラグインをダウンロードできるので、解凍後に作成されるフォルダの中から profile フォルダを入手してください。

導入方法

準備

あらかじめ管理者ページにログインしておきます。

ファイルのアップロード

profile/ 内の configs/files/libs/templates/ を、freo設置ディレクトリ内にアスキーモードで上書きアップロードします。

パーミッションの設定

ブラウザソフトで freo/index.php/setup にアクセスすると、必要なパーミッションが自動設定されます。

ただし、設置時に「ご利用のサーバーは、PHPから直接パーミッションを設定することができない環境のようです。」と表示された環境の場合は自動設定されないので、FTPソフトで以下のファイルのパーミッションを設定してください。

対象 パーミッション
configs/plugins/profile.ini 606 に設定
files/plugins/profile_files/ 707 に設定
files/temporaries/plugins/profile_files/ 707 に設定

データベースの設定

ブラウザソフトで freo/index.php/profile/setup にアクセスします。セットアップ画面が表示されるのでセットアップを実行します。

テンプレートの編集

templates/internals/user/default.html にある

<a href="{$freo.core.http_file}/user/profile_form">プロフィール編集</a>

を、以下のように修正します。

<a href="{$freo.core.http_file}/profile/form">プロフィール編集</a>

templates/internals/profile/default.html の内容を、一例ですが以下のように修正します。

{include file='header.html'}
  <h2>プロフィール</h2>
  <h3>ユーザー {$user.id} のプロフィール</h3>
  <dl>
    <dt>名前</dt>
      <dd>{$user.name}</dd>
    <dt>フリガナ</dt>
      <dd>{$plugin_profile.kana}</dd>
    <!--{if $user.url}-->
    <dt>URL</dt>
      <dd><a href="{$user.url}">{$user.url}</a></dd>
    <!--{/if}-->
    <!--{if $user.text}-->
    <dt>紹介文</dt>
      <dd>{$user.text|nl2p}</dd>
    <!--{/if}-->
    <!--{if $plugin_profile.file}-->
    <dt>イメージ</dt>
      <dd><img src="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}plugins/profile_files/{$plugin_profile.user_id}/{$plugin_profile.file}" /></dd>
    <!--{/if}-->
    <!--{if $plugin_profile.tag}-->
    <dt>タグ</dt>
      <dd><!--{foreach from=$plugin_profile_tags|smarty:nodefaults item='plugin_profile_tag' name='loop'}--><a href="{$freo.core.http_file}/profile?tag={$plugin_profile_tag|smarty:nodefaults|escape:'url'}">{$plugin_profile_tag}</a><!--{if !$smarty.foreach.loop.last}-->, <!--{/if}--><!--{/foreach}--></dd>
    <!--{/if}-->
    <!--{if $plugin_profile.category_id}-->
    <dt>カテゴリー</dt>
      <dd><a href="{$freo.core.http_file}/profile?category={$plugin_profile.category_id}">{$plugin_profile_categories[$plugin_profile.category_id].name}</a></dd>
    <!--{/if}-->
    <dt>権限</dt>
      <dd><!--{if $user.authority == 'root'}-->管理者<!--{elseif $user.authority == 'author'}-->投稿者<!--{elseif $user.authority == 'guest'}-->ゲスト<!--{/if}--></dd>
    <!--{if $user_associate.group}-->
    <dt>グループ</dt>
      <dd>
        <ul>
          <!--{foreach from=$freo.refer.groups|smarty:nodefaults item='refers_group'}-->
          <!--{if $user_associate.group[$refers_group.id]}--><li>{$refers_group.name}</li><!--{/if}-->
          <!--{/foreach}-->
        </ul>
      </dd>
    <!--{/if}-->
    <!--{if $user.authority == 'root' or $user.authority == 'author'}-->
    <dt>登録記事</dt>
      <dd><a href="{$freo.core.http_file}/entry?user={$user.id}">{$freo.core.http_file}/entry?user={$user.id}</a></dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.file01_name and $plugin_profile.file01}-->
    <dt>{$freo.config.plugin.profile.file01_name}</dt>
      <dd><a href="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}plugins/profile_files/{$plugin_profile.user_id}/{$plugin_profile.file01}">{$plugin_profile.file01}</a></dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.file02_name and $plugin_profile.file02}-->
    <dt>{$freo.config.plugin.profile.file02_name}</dt>
      <dd><a href="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}plugins/profile_files/{$plugin_profile.user_id}/{$plugin_profile.file02}">{$plugin_profile.file02}</a></dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.file03_name and $plugin_profile.file03}-->
    <dt>{$freo.config.plugin.profile.file03_name}</dt>
      <dd><a href="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}plugins/profile_files/{$plugin_profile.user_id}/{$plugin_profile.file03}">{$plugin_profile.file03}</a></dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.file04_name and $plugin_profile.file04}-->
    <dt>{$freo.config.plugin.profile.file04_name}</dt>
      <dd><a href="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}plugins/profile_files/{$plugin_profile.user_id}/{$plugin_profile.file04}">{$plugin_profile.file04}</a></dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.file05_name and $plugin_profile.file05}-->
    <dt>{$freo.config.plugin.profile.file05_name}</dt>
      <dd><a href="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}plugins/profile_files/{$plugin_profile.user_id}/{$plugin_profile.file05}">{$plugin_profile.file05}</a></dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.file06_name and $plugin_profile.file06}-->
    <dt>{$freo.config.plugin.profile.file06_name}</dt>
      <dd><a href="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}plugins/profile_files/{$plugin_profile.user_id}/{$plugin_profile.file06}">{$plugin_profile.file06}</a></dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.file07_name and $plugin_profile.file07}-->
    <dt>{$freo.config.plugin.profile.file07_name}</dt>
      <dd><a href="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}plugins/profile_files/{$plugin_profile.user_id}/{$plugin_profile.file07}">{$plugin_profile.file07}</a></dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.file08_name and $plugin_profile.file08}-->
    <dt>{$freo.config.plugin.profile.file08_name}</dt>
      <dd><a href="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}plugins/profile_files/{$plugin_profile.user_id}/{$plugin_profile.file08}">{$plugin_profile.file08}</a></dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.file09_name and $plugin_profile.file09}-->
    <dt>{$freo.config.plugin.profile.file09_name}</dt>
      <dd><a href="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}plugins/profile_files/{$plugin_profile.user_id}/{$plugin_profile.file09}">{$plugin_profile.file09}</a></dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.file10_name and $plugin_profile.file10}-->
    <dt>{$freo.config.plugin.profile.file10_name}</dt>
      <dd><a href="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}plugins/profile_files/{$plugin_profile.user_id}/{$plugin_profile.file10}">{$plugin_profile.file10}</a></dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.option01_name}-->
    <dt>{$freo.config.plugin.profile.option01_name and $plugin_profile.option01}</dt>
      <dd>{$plugin_profile.option01}</dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.option02_name}-->
    <dt>{$freo.config.plugin.profile.option02_name and $plugin_profile.option02}</dt>
      <dd>{$plugin_profile.option02}</dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.option03_name}-->
    <dt>{$freo.config.plugin.profile.option03_name and $plugin_profile.option03}</dt>
      <dd>{$plugin_profile.option03}</dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.option04_name}-->
    <dt>{$freo.config.plugin.profile.option04_name and $plugin_profile.option04}</dt>
      <dd>{$plugin_profile.option04}</dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.option05_name}-->
    <dt>{$freo.config.plugin.profile.option05_name and $plugin_profile.option05}</dt>
      <dd>{$plugin_profile.option05}</dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.option06_name}-->
    <dt>{$freo.config.plugin.profile.option06_name and $plugin_profile.option06}</dt>
      <dd>{$plugin_profile.option06}</dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.option07_name}-->
    <dt>{$freo.config.plugin.profile.option07_name and $plugin_profile.option07}</dt>
      <dd>{$plugin_profile.option07}</dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.option08_name}-->
    <dt>{$freo.config.plugin.profile.option08_name and $plugin_profile.option08}</dt>
      <dd>{$plugin_profile.option08}</dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.option09_name}-->
    <dt>{$freo.config.plugin.profile.option09_name and $plugin_profile.option09}</dt>
      <dd>{$plugin_profile.option09}</dd>
    <!--{/if}-->
    <!--{if $freo.config.plugin.profile.option10_name}-->
    <dt>{$freo.config.plugin.profile.option10_name and $plugin_profile.option10}</dt>
      <dd>{$plugin_profile.option10}</dd>
    <!--{/if}-->
  </dl>
{include file='footer.html'}

完了

管理者ページにログイン後、管理メニューから「プラグイン」→「プロフィール拡張」を選択すると、登録ユーザーに対してプロフィール情報を追加登録できます。

もしくはゲストユーザーとしてログイン後、「プロフィール編集」を選択すると、自分でプロフィール情報を追加登録できます。

登録されたプロフィール情報は、freo/index.php/profile にアクセスすると一覧表示されるので、必要に応じて任意の場所からこのページにリンクしておきます。

機能解説

携帯からのアクセス

携帯から freo/index.php/profile にアクセスすると、携帯用の表示になります。(プロフィール表示画面のみで、登録画面は非対応。)

削除方法

このプラグインは、以下の手順で削除できます。

ファイルの編集

テンプレートに追加したコードを削除します。

データベースの削除

データベースから plugin_profilesplugin_profile_categories を削除します。(削除しなくてもfreoの動作には問題ありません。)

ファイルの削除

以下のファイルを削除します。

  • configs/plugins/profile.ini
  • files/plugins/profile_files/ (ディレクトリごと削除)
  • files/temporaries/plugins/profile_files/ (ディレクトリごと削除)
  • libs/freo/plugins/config.profile.php
  • libs/freo/plugins/display.profile.php
  • libs/freo/plugins/end.profile.php
  • libs/freo/plugins/page.profile.php
  • templates/mobiles/plugins/profile/ (ディレクトリごと削除)
  • templates/plugins/profile/ (ディレクトリごと削除)

更新履歴

  • 最新版との差分ファイルを一覧表示できます。
  • 使用しているプロフィール拡張プラグインのバージョンを入力してください。
  • 更新内容の詳細は、以下の更新履歴を確認してください。
差分調査
使用しているバージョン

2013/09/24 Ver 1.0.0

正式版を公開しました。アルファ版からバージョンアップする場合、すべてのファイルを上書きアップロードしてください。