個別エントリーでの変数

個別エントリー(/view/)で表示できる変数

データベースに格納されるエントリー情報({$entry.xxx})

値はエントリー格納テーブルfreo_entries)に準ずる。
変数 変数の内容 値/(NULL)は空白
{$entry.id} エントリーID (数字)
{$entry.user_id} ユーザーID (英数字)
{$entry.created} 新規登録日時 例:2015-01-01 21:18:00
{$entry.modified} 最終更新日時 例:2015-01-01 21:18:00
{$entry.approved} 承認 yes:承認
no:未承認
{$entry.restriction} 閲覧制限 user:ユーザー登録で制限
group:グループで制限
password:パスワードで制限
(NULL):制限なし
{$entry.password} パスワード (MD5変換)
{$entry.status} 状態 publish:公開
private:非公開
future:予約投稿
{$entry.display} 表示 publish:初期画面に表示する
private:初期画面に表示しない
{$entry.comment} コメントの受付 open:受け付ける
closed:受け付けない
view:表示のみ
user:登録ユーザーから受け付ける
{$entry.trackback} トラックバックの受付 open:受け付ける
closed:受け付けない
view:表示のみ
{$entry.code} コード (英数字)
{$entry.title} タイトル  
{$entry.tag} タグ 例:タグ1,タグ2(複数の場合は「,」で区切りを表記)
{$entry.datetime} 日時 例:2015-01-01 21:18:00
{$entry.close} 公開終了日時 例:2015-01-01 21:18:00
{$entry.file} ファイル名 エントリーID.jpg
{$entry.image} イメージ名 エントリーID.jpg
{$entry.memo} ファイルの説明  
{$entry.text} 本文  

データベースに格納されないエントリー情報({$entry_xxx})

カテゴリー

変数 変数の内容  
{$entry_associate.category} $entry.idの
カテゴリー情報
 
{$entry_category} foreachで取得した
カテゴリーID
(英数字)
※foreachで取得したカテゴリーID($entry_category)のカテゴリーの情報を取得する。値はカテゴリー格納テーブルfreo_categories)に準ずる。
変数 変数の内容  
{$freo.refer.categories[$entry_category].id} ID (英数字)
{$freo.refer.categories[$entry_category].pid} 親ID (英数字)
{$freo.refer.categories[$entry_category].created} 登録日時 例:2015-01-01 21:18:00
{$freo.refer.categories[$entry_category].modified} 更新日時 例:2015-01-01 21:18:00
{$freo.refer.categories[$entry_category].display} 表示 publish:初期画面に表示する
private:初期画面に表示しない
{$freo.refer.categories[$entry_category].sort} 並び順 (数字)
{$freo.refer.categories[$entry_category].name} カテゴリー名  
{$freo.refer.categories[$entry_category].memo} 説明  
※表記例
<!--{if $entry_associate.category}-->
<dl>
    <dt>カテゴリー</dt>
        <!--{foreach from=$entry_associate.category|smarty:nodefaults key='entry_category' item='entry_category' name='loop'}-->
        <dd><a href="{$freo.core.http_file}/category/{$entry_category}">{$freo.refer.categories[$entry_category].name}</a></dd>
        <!--{/foreach}-->
</dl>
<!--{/if}-->
上記の場合、HTML表示は
<dl>
    <dt>カテゴリー</dt>
        <dd><a href="http://www.example.com/freo/category/category1">カテゴリー1</a></dd>
        <dd><a href="http://www.example.com/freo/category/category2">カテゴリー2</a></dd>
</dl>
のようになる

タグの表記例

<!--{if $entry_tags}-->
<dl>
    <dt>タグ</dt>
        <!--{foreach from=$entry_tags|smarty:nodefaults item='entry_tag' name='loop'}-->
        <dd><a href="{$freo.core.http_file}/entry?tag={$entry_tag|smarty:nodefaults|escape:'url'}">{$entry_tag}</a></dd>
        <!--{/foreach}-->
</dl>
<!--{/if}-->
上記の場合、HTML表示は
<dl>
    <dt>タグ</dt>
        <dd><a href="http://www.example.com/freo/entry?tag=タグ1">タグ1</a></dd>
        <dd><a href="http://www.example.com/freo/entry?tag=タグ2">タグ2</a></dd>
</dl>
のようになる

オプションの表記例

<!--{if $entry_associate.option}-->
<dl>
    <!--{foreach from=$freo.refer.options|smarty:nodefaults item='option'}-->
    <!--{if $entry_associate.option[$option.id] != ''}-->
    <dt>{$option.name}</dt>
        <dd>
            <!--{if $option.type == 'file'}-->
            <a href="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}entry_options/{$entry.id}/{$option.id}/{$entry_associate.option[$option.id]}">{$entry_associate.option[$option.id]}</a>
            <!--{else}-->
            {$entry_associate.option[$option.id]|nl2br}
            <!--{/if}-->
        </dd>
    <!--{/if}-->
    <!--{/foreach}-->
</dl>
<!--{/if}-->
上記の場合、HTML表示は
<dl>
    <dt>オプション1</dt>
        <dd>
            <a href="http://www.example.com/freo/entry_options/1/option1/option.jpg">option.jpg</a>
        </dd>
    <dt>オプション2</dt>
        <dd>
            オプション2の事項
        </dd>
</dl>
のようになる

添付ファイル

変数 変数の内容
{$entry_file.width} 添付ファイル(画像)の幅 (数字)
{$entry_file.height} 添付ファイル(画像)の高さ (数字)
{$entry_file.size} 添付ファイルの容量 (数字)
{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}entry_files/{$entry.id}/{$entry.file} 添付ファイルのURL 例:http://www.example.com/freo/files/entry_files/1/1.jpg
※設置URL/files/entry_files/エントリーID/エントリーID.jpg
{$entry_thumbnail.width} サムネイルの幅 (数字)
{$entry_thumbnail.height} サムネイルの高さ (数字)
{$entry_thumbnail.size} サムネイルの容量 (数字)
{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}entry_thumbnails/{$entry.id}/{$entry.file} サムネイルのURL 例:http://www.example.com/freo/files/entry_thumbnails/1/1.jpg
※設置URL/files/entry_thumbnails/エントリーID/エントリーID.jpg

添付イメージ

変数 変数の内容
{$entry_image.width} 添付イメージの幅 (数字)
{$entry_image.height} 添付イメージの高さ (数字)
{$entry_image.size} 添付イメージの容量 (数字)
{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}entry_images/{$entry.id}/{$entry.image} 添付イメージのURL 例:http://www.example.com/freo/files/entry_images/1/1.jpg
※設置URL/files/entry_images/エントリーID/エントリーID.jpg

エントリー本文

変数 変数の内容
{$entry_text.excerpt|smarty:nodefaults} エントリー本文
{$entry_text.more|smarty:nodefaults} エントリー本文(続きの部分)
|smarty:nodefaultsをつけてHTMLを反映させる必要あり

セキュリティ

変数 変数の内容
{$entry_security} 閲覧制限時のセキュリティ 1:制限中
(NULL):認証済もしくは制限しない


※ここに載っていない情報が何かあれば...情報を追加・編集する
※編集は面倒・やり方が分からない場合は、コメント欄に書いていただければ有志の方で編集します。

コメントを投稿するには画像の文字を半角数字で入力してください。


画像認証

  • 最終更新:2016-06-18 00:26:44

このWIKIを編集するにはパスワード入力が必要です

認証パスワード