【ココログプロ】最近のコメントをRSS配信するためのテンプレート
ふと思い立ち、タイトルどおり、最近のコメントをRSS配信するためのテンプレートを作ってみました。
サンプルRSS:風柳亭別館の最近のコメント
ブログオーナにとっては便利かも知れないけれど、ココログプロ使用者でかつ上級テンプレート使っていないとだめなので、汎用性は低いです。
サンプルRSS:風柳亭別館の最近のコメント
ブログオーナにとっては便利かも知れないけれど、ココログプロ使用者でかつ上級テンプレート使っていないとだめなので、汎用性は低いです。
MTとかTypePadのブログでは応用可能だと思いますが。
テンプレート名: RSS Recent Comment
出力ファイル: recent-comment-index.rdf
出力ファイル: recent-comment-index.rdf
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:cc="http://web.resource.org/cc/"
xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="<$MTBlogURL$>">
<title><$MTBlogName remove_html="1" encode_xml="1"$>(最近のコメント一覧)</title>
<link><$MTBlogURL$></link>
<description><$MTBlogDescription remove_html="1" encode_xml="1"$></description>
<dc:language><$MTBlogLanguage$></dc:language>
<dc:creator></dc:creator>
<dc:date><MTEntries lastn="1"><$MTEntryDate format_name="W3CDTF"$></MTEntries></dc:date>
<admin:generatorAgent rdf:resource="http://www.typepad.com/?v=<$MTVersion$>" />
<MTBlogIfCCLicense>
<cc:license rdf:resource="<$MTBlogCCLicenseURL$>" />
</MTBlogIfCCLicense>
<items>
<rdf:Seq>
<MTComments lastn="20" sort_order="descend">
<MTCommentEntry>
<rdf:li rdf:resource="<$MTEntryPermalink encode_xml="1"$>#c<$MTCommentID$>" />
</MTCommentEntry>
</MTComments>
</rdf:Seq>
</items>
</channel>
<MTComments lastn="20" sort_order="descend">
<MTCommentEntry>
<item rdf:about="<$MTEntryPermalink encode_xml="1"$>#c<$MTCommentID$>">
<title><$MTCommentAuthor encode_xml="1"$> on <$MTEntryTitle encode_xml="1"$></title>
<link><$MTEntryPermalink encode_xml="1"$>#c<$MTCommentID$></link>
<description><$MTCommentBody encode_xml="1"$></description>
<MTEntryCategories>
<dc:subject><$MTCategoryLabel encode_xml="1"$></dc:subject>
</MTEntryCategories>
<dc:creator><$MTCommentAuthor encode_xml="1"$></dc:creator>
</MTCommentEntry>
<dc:date><$MTCommentDate format_name="W3CDTF"$></dc:date>
</item>
</MTComments>
</rdf:RDF>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:cc="http://web.resource.org/cc/"
xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="<$MTBlogURL$>">
<title><$MTBlogName remove_html="1" encode_xml="1"$>(最近のコメント一覧)</title>
<link><$MTBlogURL$></link>
<description><$MTBlogDescription remove_html="1" encode_xml="1"$></description>
<dc:language><$MTBlogLanguage$></dc:language>
<dc:creator></dc:creator>
<dc:date><MTEntries lastn="1"><$MTEntryDate format_name="W3CDTF"$></MTEntries></dc:date>
<admin:generatorAgent rdf:resource="http://www.typepad.com/?v=<$MTVersion$>" />
<MTBlogIfCCLicense>
<cc:license rdf:resource="<$MTBlogCCLicenseURL$>" />
</MTBlogIfCCLicense>
<items>
<rdf:Seq>
<MTComments lastn="20" sort_order="descend">
<MTCommentEntry>
<rdf:li rdf:resource="<$MTEntryPermalink encode_xml="1"$>#c<$MTCommentID$>" />
</MTCommentEntry>
</MTComments>
</rdf:Seq>
</items>
</channel>
<MTComments lastn="20" sort_order="descend">
<MTCommentEntry>
<item rdf:about="<$MTEntryPermalink encode_xml="1"$>#c<$MTCommentID$>">
<title><$MTCommentAuthor encode_xml="1"$> on <$MTEntryTitle encode_xml="1"$></title>
<link><$MTEntryPermalink encode_xml="1"$>#c<$MTCommentID$></link>
<description><$MTCommentBody encode_xml="1"$></description>
<MTEntryCategories>
<dc:subject><$MTCategoryLabel encode_xml="1"$></dc:subject>
</MTEntryCategories>
<dc:creator><$MTCommentAuthor encode_xml="1"$></dc:creator>
</MTCommentEntry>
<dc:date><$MTCommentDate format_name="W3CDTF"$></dc:date>
</item>
</MTComments>
</rdf:RDF>
MTCommentDateをMTCommentEntry内に入れておいたら、コメントの日付じゃなくて記事の日付になってしまった……外に出したら一応OKっぽい。生兵法は良くないですね(苦笑)。
« セブンアンドワイの検索フォームをサイドバーに | トップページ | ココログの記事の読み込み/書き出しがうまくいかない…… »
「ウェブログ・ココログ関連」カテゴリの記事
- 久しぶりの投稿がココログへの苦言というのもなんなのですが……(2019.03.20)
- ココログをTwitterカードに対応させてみる(2016.11.23)
- 【覚書】風柳亭(ココログプロ)をレスポンシブWebデザイン化(Bootstrap3使用)(2015.10.09)
- ココログ用全文検索 - ココログ最強検索を jQuery を使って作り直してみた(既知の不具合の幾つかに対応)(2015.09.01)
- 現在に生きるということ。(2013.01.05)
「おもいつき」カテゴリの記事
- ココログをTwitterカードに対応させてみる(2016.11.23)
- 神使の兎 ~宇治神社にて~(2016.07.10)
- Twitter 原寸びゅー:PC版ブラウザ用・Twitterの画像閲覧と保存がはかどる拡張機能の紹介(2016.02.12)
- スマートフォンをPC上の音楽を再生するためのリモコンとして使いたい(2016.01.10)
- 【覚書】風柳亭(ココログプロ)をレスポンシブWebデザイン化(Bootstrap3使用)(2015.10.09)
« セブンアンドワイの検索フォームをサイドバーに | トップページ | ココログの記事の読み込み/書き出しがうまくいかない…… »
コメント