TypePad Connect導入前のコメントを表示する。

わずかだけどTypePad Connect導入前にもらっていたコメントが表示されないのはなんだかなぁと思っていたら、解決策が。

過去に投稿されたコメントを表示するのに、コメントの詳細をインクルードして対応しました。

[From TypePad Connectを利用してみる | Bloc Notes]

なるほど。MTIncludeか。

つことで、過去使っていたコメントモジュールからからログ部分を抜き出した”CommentLog”モジュールを作成して、インクルード。

新しく抜き出したモジュールはこんな感じ。

<MTIfNonZero tag="MTEntryCommentCount">
<dl class="log">
<MTComments>
<dt<MTIfArchiveTypeEnabled archive_type="Individual"> id="comment-<$MTCommentID$>"</MTIfArchiveTypeEnabled>>
<span class="name">
<$MTCommentAuthorLink default_name="Anonymous" show_email="0" spam_protect="1"$>
<MTIfNonEmpty tag="CommentAuthorIdentity">
<MTCommentAuthorIdentity>
</MTIfNonEmpty>
</span>
<span class="date"><$MTCommentDate$></span>
</dt>
<dd<MTIfCommentParent> class="reply"</MTIfCommentParent>><$MTCommentBody$></dd>
</MTComments>
</dl>
</MTIfNonZero>

で、こんな感じでコメントテンプレートにインクルード。
2008-11-29_2128.png

上手いこと、過去コメントも表示されました。良かった。

This entry was posted in Diary, MT and tagged . Bookmark the permalink.

コメントを残す

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>