MTIfCommenterIsAuthor
コメントしたユーザーが、Movable Type に登録されているユーザーの場合にのみ実行します。
- 使い方
<div class="user-pic">
<mt:If name="userpic_type" eq="profile">
<img src="<mt:If tag="AuthorUserpicURL"><$mt:AuthorUserpicURL$><mt:Else><$mt:StaticWebPath$>images/default-userpic-90.jpg</mt:If>" width="<$mt:Var name="userpic_size"$>" height="<$mt:Var name="userpic_size"$>" alt="<$mt:AuthorDisplayName encode_html="1"$>" />
<mt:If tag="AuthorAuthType" ne="MT"><mt:If tag="AuthorAuthIconURL"><span class="auth-icon"><img src="<$mt:AuthorAuthIconURL size="logo_small"$>" alt=""/></span></mt:If></mt:If>
<mt:Else name="userpic_type" eq="commenter">
<mt:IfCommenterIsAuthor>
<a href="<$mt:CGIPath$><$mt:CommunityScript$>?__mode=view&blog_id=<$mt:BlogID encode_html="1"$>&id=<$mt:CommenterID$>"><img src="<mt:If tag="CommenterUserpic"><$mt:CommenterUserpicURL$><mt:Else><$mt:StaticWebPath$>images/default-userpic-90.jpg</mt:If>" width="<$mt:Var name="userpic_size"$>" height="<$mt:Var name="userpic_size"$>" alt="<$mt:CommenterName encode_html="1"$>" /></a>
<mt:Else>
<mt:If tag="CommenterID">
<a href="<$mt:CGIPath$><$mt:CommunityScript$>?__mode=view&blog_id=<$mt:BlogID encode_html="1"$>&id=<$mt:CommenterID$>"><img src="<mt:If tag="CommenterUserpic"><$mt:CommenterUserpicURL$><mt:Else><$mt:StaticWebPath$>images/default-userpic-90.jpg</mt:If>" width="<$mt:Var name="userpic_size"$>" height="<$mt:Var name="userpic_size"$>" alt="<$mt:CommenterName encode_html="1"$>" /><mt:If tag="CommenterAuthIconURL"><span class="auth-icon"><img src="<$mt:CommenterAuthIconURL size="logo_small"$>" alt=""/></span></mt:If></a>
<mt:Else>
<a href="<$mt:CommentURL$>"><img src="<mt:If tag="CommenterUserpic"><$mt:CommenterUserpicURL$><mt:Else><$mt:StaticWebPath$>images/default-userpic-90.jpg</mt:If>" width="<$mt:Var name="userpic_size"$>" height="<$mt:Var name="userpic_size"$>" alt="" /></a>
</mt:If>
</mt:IfCommenterIsAuthor>
<mt:Else name="userpic_type" eq="userlist">
<a href="<$mt:CGIPath$><$mt:CommunityScript$>?__mode=view&blog_id=<$mt:BlogID encode_html="1"$>&id=<$mt:AuthorID$>"><img src="<mt:If tag="AuthorUserpicURL"><$mt:AuthorUserpicURL$><mt:Else><$mt:StaticWebPath$>images/default-userpic-90.jpg</mt:If>" width="<$mt:Var name="userpic_size"$>" height="<$mt:Var name="userpic_size"$>" alt="<$mt:AuthorDisplayName encode_html="1"$>" /></a>
<mt:Else>
<a href="<$mt:CGIPath$><$mt:CommunityScript$>?__mode=view&blog_id=<$mt:BlogID encode_html="1"$>&id=<$mt:EntryAuthorID$>"><img src="<mt:If tag="EntryAuthorUserpicURL"><$mt:EntryAuthorUserpicURL$><mt:Else><$mt:StaticWebPath$>images/default-userpic-90.jpg</mt:If>" width="<$mt:Var name="userpic_size"$>" height="<$mt:Var name="userpic_size"$>" alt="<$mt:EntryAuthorDisplayName encode_html="1"$>" /></a>
</mt:If>
</div>