<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WordPress Note &#187; コメント</title>
	<atom:link href="http://www.df-cue.com/wp/tag/comment/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.df-cue.com/wp</link>
	<description>WordPressのプラグイン・カスタマイズ覚え書きノート</description>
	<lastBuildDate>Wed, 05 Oct 2011 14:41:40 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress3.0での、Commented entry list の不具合について</title>
		<link>http://www.df-cue.com/wp/2010/10/24/wordpress3-commented-entry-list/</link>
		<comments>http://www.df-cue.com/wp/2010/10/24/wordpress3-commented-entry-list/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 09:34:52 +0000</pubDate>
		<dc:creator>ナカグマ</dc:creator>
				<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[問題と解決法]]></category>
		<category><![CDATA[Commented entry list Plugin]]></category>
		<category><![CDATA[WordPress 3.0]]></category>
		<category><![CDATA[コメント]]></category>
		<category><![CDATA[トラックバック]]></category>

		<guid isPermaLink="false">http://www.df-cue.com/wp/?p=654</guid>
		<description><![CDATA[ずいぶん前の話題で恐縮ですが、WordPress を3.0以降にアップグレードしますと、Commented entry list プラグインが動かなくなり、最新のコメントの一覧が表示されなくなってしまいます。 その対処法 [...]]]></description>
			<content:encoded><![CDATA[				<p>ずいぶん前の話題で恐縮ですが、WordPress を3.0以降にアップグレードしますと、Commented entry list プラグインが動かなくなり、最新のコメントの一覧が表示されなくなってしまいます。</p>
				<p>その対処法が紹介されていましたので、私も参考に使わせていただきました。<br />
				ということで、こちらもメモ。</p>
				<p>参考サイト様より、そのまま拝借させていただきました。ありがとうございます。</p>
				<p><span id="more-654"></span></p>
				<dl>
				<dt>参考サイト</dt>
				<dd>
				<p><a title="WordPress 3.0 RC1 日本語版 リリース" href="http://blog.wolfs.jp/20100603-1638/">WordPress 3.0 RC1 日本語版 リリース</a></p>
				</dd>
				</dl>
				<p>commented-entry-list.php を、以下のように修正します。</p>
				<p>12行目。</p>
				<pre class="brush: php; first-line: 12; title: ; notranslate">
global $wpdb, $tablecomments, $tableposts;
</pre>
				<p>↓</p>
				<pre class="brush: php; first-line: 12; title: ; notranslate">
global $wpdb;
$tablecomments = $wpdb-&gt;comments;
$tableposts = $wpdb-&gt;posts;
</pre>
				<p>70行目。</p>
				<pre class="brush: php; first-line: 70; title: ; notranslate">
global $wpdb, $tablecomments, $tableposts;
</pre>
				<p>↓</p>
				<pre class="brush: php; first-line: 70; title: ; notranslate">
global $wpdb;
$tablecomments = $wpdb-&gt;comments;
$tableposts = $wpdb-&gt;posts;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.df-cue.com/wp/2010/10/24/wordpress3-commented-entry-list/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Commented entry list Plugin : 最近のコメントと最近のトラックバックを表示するプラグイン</title>
		<link>http://www.df-cue.com/wp/2009/06/20/commented-entry-list-plugin/</link>
		<comments>http://www.df-cue.com/wp/2009/06/20/commented-entry-list-plugin/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 03:30:54 +0000</pubDate>
		<dc:creator>ナカグマ</dc:creator>
				<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[Commented entry list Plugin]]></category>
		<category><![CDATA[コメント]]></category>
		<category><![CDATA[トラックバック]]></category>

		<guid isPermaLink="false">http://www.df-cue.com/wp/?p=87</guid>
		<description><![CDATA[最近のコメントをサイドバーなどに表示することは、Movable Type なら訳のないことなのですが、こと WordPress に限っては、独自に用意しないといけなくてちょっとめんどくさい。それでも、最近のバージョンでは [...]]]></description>
			<content:encoded><![CDATA[				<p>最近のコメントをサイドバーなどに表示することは、Movable Type なら訳のないことなのですが、こと WordPress に限っては、独自に用意しないといけなくてちょっとめんどくさい。それでも、最近のバージョンでは「ウィジェット」を使って設定できるようになっており、WordPress も進化しています。</p>
				<p>ただ「ウィジェット」を使う場合は、限られたスタイルでしか表示できないので、こだわる人にはあまり魅力的にはうつらないのではないでしょうか。それに「ウィジェット」に対応させたテーマでないと、使うことはできません。<br />
				「ウィジェット」に対応していないテーマを使っているときや、表示スタイルにもこだわりたい…、そんなときに使いたいプラグインです。<br />
				また、最近のコメントと最近のトラックバックに分けて表示ができるのも魅力。</p>
				<dl>
				<dt>Commented entry list Plugin</dt>
				<dd>
				<p>最近のコメントと最近のトラックバックを表示するプラグイン。<br />
				個別記事ページで、コメントとトラックバックを分けて表示もできる。<br />
				配布元 : <a title="Commented entry list Plugin" href="http://hirobee.jp/archives/2005/05/commented-entry-list-11/">Commented entry list Plugin（Ver. 1.2）</a></p>
				</dd>
				</dl>
				<p><span id="more-87"></span></p>
				<h3>使い方</h3>
				<ol>
				<li>
				<p>配布元より、<a title="Commented entry list Plugin" href="http://hirobee.jp/archives/2005/05/commented-entry-list-11/">Commented entry list Plugin（Ver. 1.2）</a>をダウンロードします。（commented-entry-list_1.2.zip）</p>
				</li>
				<li>
				<p>解凍すると「commented-entry-list_1.2」というフォルダが展開されるので、フォルダの中の「commented-entry-list.php」を wp-content/plugins にアップロードします。</p>
				</li>
				<li>
				<p>「プラグイン」の画面で、「Commented entry list」を有効化します。（※「使用する」をクリック）</p>
				</li>
				<li>
				<p>最近のコメントを入れたいところに、<em>&lt;?php get_recently_commented(); ?&gt;</em> を、<br />
				最近のトラックバックを入れたいところに <em>&lt;?php get_recently_trackbacked(); ?&gt;</em> を挿入します。<br />
				()の中に数字を入れると、その数字分のコメントとトラックバックが表示されます。</p>
				<p>例）最近のコメントを10件ずつ表示する場合</p>
				<pre class="brush: php; title: ; notranslate">
&lt;ul&gt;
	&lt;?php get_recently_commented(10); ?&gt;
&lt;/ul&gt;
</pre>
				</li>
				<li>
				<p>また、同梱されている「comments.php」を、使用中のテーマのものと入れ替えると、個別記事ページでコメントとトラックバックを別に表示させることができます。</p>
				</li>
				</ol>
				<h3>注意点</h3>
				<p>同梱されている「comments.php」ですが、119行目付近のコメント本文入力欄をしめす &lt;textarea&gt; タグの前に <em>&lt;?php wp_grins(); ?&gt;</em> というソースが入っています。でも、これはスマイリーアイコンを使用できるようにするプラグイン「<a href="http://wordpress.org/extend/plugins/wp-grins/">WP Grins</a>」を呼び出すためのソースなので、そのプラグインを入れていない人は削除しておくと良いです。<br />
				（たしか、私は最初これでエラーが出ました）</p>
				<pre class="brush: xml; first-line: 117; highlight: [119]; title: ; notranslate">
&lt;!--&lt;p&gt;&lt;small&gt;&lt;strong&gt;XHTML:&lt;/strong&gt; You can use these tags: &lt;?php echo allowed_tags(); ?&gt;&lt;/small&gt;&lt;/p&gt;--&gt;

&lt;?php wp_grins(); ?&gt;&lt;p&gt;&lt;textarea name=&quot;comment&quot; id=&quot;comment&quot; cols=&quot;100%&quot; rows=&quot;10&quot; tabindex=&quot;4&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;

&lt;input name=&quot;submit&quot; type=&quot;submit&quot; id=&quot;submit&quot; tabindex=&quot;5&quot; value=&quot;Submit Comment&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;comment_post_ID&quot; value=&quot;&lt;?php echo $id; ?&gt;&quot; /&gt;
&lt;?php do_action('comment_form', $post-&gt;ID); ?&gt;
</pre>
				<p>WordPress 3.0 以降では、このCommented entry list プラグインが動作しませんが、commented-entry-list.php を少し修正するだけで動作するようになります。<br />
				（2010.10.24　<a href="http://www.df-cue.com/wp/2010/10/24/wordpress3-commented-entry-list/">「WordPress3.0での、Commented entry list の不具合について」</a>の記事 も投稿しました）</p>
				<h3>カスタマイズ</h3>
				<p>「commented-entry-list.php」を変更することで、表示のカスタマイズがいろいろと可能です。</p>
				<h4>時刻、日付の書式の変更</h4>
				<p>38行目、78行目</p>
				<pre class="brush: plain; title: ; notranslate">$comment_date = mysql2date('H:i', $comment_date);</pre>
<p>40行目、80行目</p>
<pre class="brush: plain; title: ; notranslate">$comment_date = mysql2date('m/d', $comment_date);</pre>
				<p>の&#8217;H:i&#8217;、&#8217;m/d&#8217;を変更すると、時刻、日付の書式が変更できます。（<a href="http://jp2.php.net/manual/ja/function.date.php" target="_blank">PHPの日付・時刻書式を参照</a>）</p>
				<h4>投稿者名のリンクのはずし方</h4>
				<p>デフォルトでは、投稿者名のリンクをクリックすると、投稿者が記入したURLにジャンプしてしまい、コメントにジャンプするつもりだった人には使いにくいです。そんなとき、以下の方法でリンクをはずします。</p>
				<p>最後の方、105行目より以下の部分の「$ret .= $author;」だけを残して、それ以外を削除します。</p>
				<pre class="brush: php; auto-links: false; first-line: 105; highlight: [108]; title: ; notranslate">
	$url = str_replace('http://url', '', $url);
	$url = preg_replace('|[^a-z0-9-_.?#=&amp;;,/:~]|i', '', $url);
	if (empty($url)/* &amp;&amp; empty($email)*/) {
		$ret .= $author;
	}else{
		$ret .= '&lt;a href=&quot;';
			if ($url) {
				$url = str_replace(';//', '://', $url);
				$url = (!strstr($url, '://')) ? 'http://'.$url : $url;
				$url = preg_replace('/&amp;([^#])(?![a-z]{2,8};)/', '&amp;$1', $url);
				$ret .= $url;
//			} else {
//				$ret .= 'mailto:'.antispambot($email);
			}
			$ret .= '&quot; rel=&quot;external&quot;&gt;' . $author . '&lt;/a&gt;';
	}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.df-cue.com/wp/2009/06/20/commented-entry-list-plugin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

