<?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>Graygift@ye &#187; 最新评论</title>
	<atom:link href="http://www.graygift.com/tag/%e6%9c%80%e6%96%b0%e8%af%84%e8%ae%ba/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.graygift.com</link>
	<description>我是孤独的根号5      </description>
	<lastBuildDate>Sun, 08 Nov 2009 02:13:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>wordpress主题&#8211;最新评论代码</title>
		<link>http://www.graygift.com/wordpress/wordpress-theme-the-latest-comments-code/</link>
		<comments>http://www.graygift.com/wordpress/wordpress-theme-the-latest-comments-code/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 09:42:27 +0000</pubDate>
		<dc:creator>Graygift</dc:creator>
				<category><![CDATA[knowledge]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[最新评论]]></category>

		<guid isPermaLink="false">http://www.graygift.com/wordpress/wordpress%e4%b8%bb%e9%a2%98-%e6%9c%80%e6%96%b0%e8%af%84%e8%ae%ba%e4%bb%a3%e7%a0%81/</guid>
		<description><![CDATA[?Download download.txt1 2 3 4 5 6 7 8 9 10 11 12 13 14 &#60; ?php global $wpdb; $sql = &#34;SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url, S... ]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.graygift.com/wordpress/wp-content/plugins/wp-codebox/wp-codebox.php?p=1094&amp;download=download.txt">download.txt</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p10942"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p1094code2"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php 
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url, SUBSTRING(comment_content,1,30) AS com_excerpt FROM <span style="color: #006699; font-weight: bold;">$wpdb-&gt;comments</span> LEFT OUTER JOIN <span style="color: #006699; font-weight: bold;">$wpdb-&gt;posts</span> ON (<span style="color: #006699; font-weight: bold;">$wpdb-&gt;comments</span>.comment_post_ID = <span style="color: #006699; font-weight: bold;">$wpdb-&gt;posts</span>.ID) WHERE comment_approved = '1' AND comment_type = &quot;</span> AND post_password <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot; ORDER BY comment_date_gmt DESC LIMIT 10&quot;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #000088;">$comments</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$pre_HTML</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$comments</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$comment</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&lt;li&gt;&quot;</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;#comment-&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_ID</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> title=<span style="color: #000099; font-weight: bold;">\&quot;</span>on &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #339933;">.</span><a href="http://www.php.net/strip_tags"><span style="color: #990000;">strip_tags</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_author</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/a&gt;&quot;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;: &quot;</span> <span style="color: #339933;">.</span><a href="http://www.php.net/strip_tags"><span style="color: #990000;">strip_tags</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">com_excerpt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
&nbsp;
<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$post_HTML</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<ul class="related_post"><li><a href="http://www.graygift.com/wordpress/wordpress-theme-related-articles-code/" title="wordpress主题&ndash;相关文章代码">wordpress主题&ndash;相关文章代码</a></li><li><a href="http://www.graygift.com/wordpress/wordpress-theme-random-article-code/" title="wordpress主题&ndash;随机文章代码">wordpress主题&ndash;随机文章代码</a></li><li><a href="http://www.graygift.com/wordpress/wordpress-theme-the-latest-article-code/" title="wordpress主题&ndash;最新文章代码">wordpress主题&ndash;最新文章代码</a></li><li><a href="http://www.graygift.com/wordpress/wordpress-theme-the-hottest-article-code/" title="wordpress主题&ndash;最热文章代码">wordpress主题&ndash;最热文章代码</a></li><li><a href="http://www.graygift.com/wordpress/wordpress-template-modified-basic-knowledge-of-the-subject/" title="WordPress主题模板修改基本知识">WordPress主题模板修改基本知识</a></li><li><a href="http://www.graygift.com/wordpress/comment-page-to-add-and-delete-spam-links/" title="评论页添加删除和垃圾评论链接">评论页添加删除和垃圾评论链接</a></li><li><a href="http://www.graygift.com/wordpress/detailed-comment-php-production-template/" title="Comment.php模板的制作详解">Comment.php模板的制作详解</a></li><li><a href="http://www.graygift.com/wordpress/wordpress-theme-navigation-bar-of-the-drop-down-list/" title="wordpress 主题之下拉列表导航栏">wordpress 主题之下拉列表导航栏</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.graygift.com/wordpress/wordpress-theme-the-latest-comments-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

