TopMovable Typeプラグイン > Action Streams プラグイン(Movable Type 5 対応)の利用方法:その3
2010年7月27日

Action Streams プラグイン(Movable Type 5 対応)の利用方法:その3

Posted at July 27,2010 11:55 PM
Category:[プラグイン]
Tag:[, , ]

日が空いてしまいましたが、「Action Streams プラグイン(Movable Type 5 対応)の利用方法:その3」では、利用サービス一覧を表示するテンプレートを紹介します。

これまでの記事は以下のリンクからご覧ください。

1.特定ユーザーの利用サービス一覧を表示する

次のようなリストを表示します。

特定ユーザーの利用サービス一覧を表示

MTAuthorsタグとMTOtherProfilesタグを組み合わせます。MTAuthorsタグにはdisplay_nameモディファイアをつけて、特定のユーザーを指定します。サブテンプレートで使われているMTOtherProfileVarタグは利用サービスの情報を出力するためのものです。

<mt:SetVar name="author" value="mtbook" />
<mt:Authors display_name="$author" need_entry="0">
<mt:OtherProfiles author="$author">
    <mt:If name="__first__">
<div class="widget-elsewhere widget">
    <h3 class="widget-header"><mt:GetVar name="author" /> の利用サービス一覧</a></h3>
    <div class="widget-content">
        <ul class="action-stream-list">
    </mt:If>
            <li><a href="<mt:OtherProfileVar name="uri" escape="html" />" class="service-icon service-<mt:OtherProfileVar name="type" />"><mt:OtherProfileVar name="label" escape="html" /></a></li>
    <mt:If name="__last__">
        </ul>
    </div>
</div>
    </mt:If>
</mt:OtherProfiles>
</mt:Authors>

MTOtherProfileVarタグのモディファイアの意味は次の通りです。

モディファイア出力内容
type利用サービスを識別するキーワード
label利用サービス名
ident利用サービスを Movable Type に登録する際に入力したユーザー ID
uri利用サービス上でのユーザープロフィールページ URL

次のように、MTAuthorsタグを利用しない方法もあります。

<mt:SetVar name="author" value="mtbook" />
<mt:OtherProfiles author="$author">
    <mt:If name="__first__">
<div class="widget-elsewhere widget">
    <h3 class="widget-header"><mt:Var name="author" /> の利用サービス一覧</a></h3>
    <div class="widget-content">
        <ul>
    </mt:If>
            <li class="service-<mt:OtherProfileVar name="type" />"><a href="<mt:OtherProfileVar name="uri" escape="html" />"><mt:OtherProfileVar name="label" escape="html" /></a></li>
    <mt:If name="__last__">
        </ul>
    </div>
</div>
    </mt:If>
</mt:OtherProfiles>

2.全ユーザーの利用サービスをユーザー別に表示する

次のような複数ユーザーのリストを表示します。

複数ユーザーの利用サービス一覧を表示

この場合、MTAuthorsタグからdisplay_nameモディファイアを除去します。また、h3要素部分には、MTAuthorDisplayNameタグを利用します。

<mt:Authors need_entry="0">
<mt:OtherProfiles author="$author">
    <mt:If name="__first__">
<div class="widget-elsewhere widget">
    <h3 class="widget-header"><mt:AuthorDisplayName /> の利用サービス一覧</a></h3>
    <div class="widget-content">
        <ul class="action-stream-list">
    </mt:If>
            <li><a href="<mt:OtherProfileVar name="uri" escape="html" />" class="service-icon service-<mt:OtherProfileVar name="type" />"><mt:OtherProfileVar name="label" escape="html" /></a></li>
    <mt:If name="__last__">
        </ul>
    </div>
</div>
    </mt:If>
</mt:OtherProfiles>
</mt:Authors>
Posted by yujiro   このページの先頭に戻る
関連記事
この記事を読んだ人はこんな記事も読んでいます
人気エントリー
Hatena Hot Entries
Hatena Entries
トラックバックURL


コメントする
greeting

*必須

*必須(非表示)


ご質問のコメントの回答については、内容あるいは多忙の場合、1週間以上かかる場合があります。また、すべてのご質問にはお答えできない可能性があります。予めご了承ください。

太字 イタリック アンダーライン ハイパーリンク 引用
[サインインしない場合はここにCAPTCHAを表示します]

コメント投稿後にScript Errorや500エラーが表示された場合は、すぐに再送信せず、ブラウザの「戻る」ボタンで一旦エントリーのページに戻り(プレビュー画面で投稿した場合は、投稿内容をマウスコピーしてからエントリーのページに戻り)、ブラウザをリロードして投稿コメントが反映されていることを確認してください。

コメント欄に(X)HTMLタグやMTタグを記述される場合、「<」は「&lt;」、「>」は「&gt;」と入力してください。例えば「<$MTBlogURL$>」は「&lt;$MTBlogURL$&gt;」となります(全て半角文字)

Now loading...
Introduction
Entries of this Category
Recent Entries
Recent Comments
Recent Trackbacks
QRcode

現在停止中です
携帯電話からこのQRcodeを撮影することで携帯用URLを取得することができます

URI for cellular phones
ギターに入った猫
Styles
Font Size
Default
For defective color vision
Gray Scale
RGB Color
Search this site

このブログをメールで購読する by:FeedBurner

loading ...
Categories
Monthly Archives
BlogPeople
Syndicate this site
FeedBurner(RSS1.0/RSS2.0/Atom)
Counter
これまでのアクセス
クリエイティブ・コモンズ・ライセンス
Powered by
Movable Type 5.12