{"id":633,"date":"2009-06-02T00:26:22","date_gmt":"2009-06-01T16:26:22","guid":{"rendered":"http:\/\/www.lmyoaoa.com\/inn\/?p=633"},"modified":"2009-06-02T00:26:22","modified_gmt":"2009-06-01T16:26:22","slug":"%e5%9c%a8%e4%be%a7%e8%be%b9%e6%a0%8f%e6%9c%80%e6%96%b0%e8%af%84%e8%ae%ba%e6%95%88%e6%9e%9c","status":"publish","type":"post","link":"http:\/\/www.lmyoaoa.com\/inn\/archives\/633\/","title":{"rendered":"\u5728\u4fa7\u8fb9\u680f\u6700\u65b0\u8bc4\u8bba\u6548\u679c"},"content":{"rendered":"<p>\u00a0<a href=\"http:\/\/www.lmyoaoa.com\/inn\/wp-content\/uploads\/2009\/06\/e69c80e696b0e8af84e8aeba.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-635\" title=\"e69c80e696b0e8af84e8aeba\" src=\"http:\/\/www.lmyoaoa.com\/inn\/wp-content\/uploads\/2009\/06\/e69c80e696b0e8af84e8aeba.jpg\" alt=\"e69c80e696b0e8af84e8aeba\" width=\"468\" height=\"90\" \/><\/a><br \/>\n\u00a0\u00a0\u00a0 \u6211\u60f3\u5f88\u591a\u4eba\u7684\u4e3b\u9898\u90fd\u81ea\u5e26\u6216\u8005\u81ea\u5df1\u65e9\u5df2\u7ecf\u6dfb\u52a0\u4e0a\u4e86\u8fd9\u4e2a\u529f\u80fd\u4e86\u5427\u3002\u521a\u521a\u5728\u5c0f\u96ef\u5b50\u90a3\u8fb9\u770b\u5230\u7d2b\u96e8\u5144\u5efa\u8bae\u5979\u52a0\u4e0a\u6700\u65b0\u8bc4\u8bba\u8fd9\u4e2a\u529f\u80fd\uff0c\u60f3\u60f3\u786e\u5b9e\uff0c\u4e3a\u4ec0\u4e48\u6211\u8fd9\u8fb9\u4e0d\u52a0\u4e0a\u5462\uff5e\u60f3\u8981\u90a3\u4e48\u5c31\u52a8\u624b\uff5e<\/p>\n<p>\u00a0\u00a0\u00a0 \u8fd9\u4e2a\u4e0d\u9700\u8981\u63d2\u4ef6\uff0c\u76f4\u63a5\u5728\u559c\u6b22\u7684\u5730\u65b9\u52a0\u4e0a\u4e24\u53e5\u4ee3\u7801\u5c31\u53ef\u4ee5\uff0c\u8c37\u6b4c\u4e86\u4e00\u4e0b\uff0c\u51fa\u73b0\u6bd4\u8f83\u591a\u8fd9\u7c7b\u6587\u7ae0\uff0c\u4e5f\u53d1\u73b0\u6709\u4e00\u4e9b\u63d2\u4ef6\u7684\u00b7\u00b7\u611f\u89c9\u90fd\u9ebb\u70e6Orz\uff0c\u6216\u8bb8\u6211\u771f\u4e0d\u9002\u5408\u5199\u4ee3\u7801\u00b7\u00b7\u5e9f\u8bdd\u4e0d\u8bf4\u5427\uff0c\u6700\u540e\u8fd8\u662f\u5728\u8bba\u575b\u641c\u5230\u7bc7\u6ee1\u610f\u7684:<\/p>\n<p>\u00a0\u00a0\u00a0 \u5728sidebar.php\u9875\u9762\u91cc\uff08\u4e00\u822c\u90fd\u662f\u5728\u8fd9\u9875\u7684\u5427\uff0c\u5176\u4ed6\u7684\u4eba\u5c31\u81ea\u5df1\u627e\u5408\u9002\u7684\u5730\u65b9\u5566\uff0c\u90fd\u53ef\u4ee5<img decoding=\"async\" class=\"xemotion\" src=\"http:\/\/www.lmyoaoa.com\/inn\/wp-content\/plugins\/x-emotions\/emotions\/char\/icon_smile.gif\" border=\"0\" alt=\"\" \/>\uff09\u52a0\u4e0a\u8fd9\u4e00\u6bb5\uff1a<!--more--><\/p>\n<blockquote><p>&lt;?php<br \/>\nglobal $wpdb;<br \/>\n$sql = &#8220;SELECT DISTINCT ID, post_title, post_password, comment_ID,<br \/>\ncomment_post_ID, comment_author, comment_date_gmt, comment_approved,<br \/>\ncomment_type,comment_author_url,<br \/>\nSUBSTRING(comment_content,1,18) AS com_excerpt<br \/>\nFROM $wpdb-&gt;comments<br \/>\nLEFT OUTER JOIN $wpdb-&gt;posts ON ($wpdb-&gt;comments.comment_post_ID = $wpdb-&gt;posts.ID)<br \/>\nWHERE comment_approved = &#8216;1&#8217; AND comment_type = &#8221; AND<br \/>\npost_password = &#8221;<br \/>\nORDER BY comment_date_gmt DESC<br \/>\nLIMIT 10&#8243;;<br \/>\n$comments = $wpdb-&gt;get_results($sql);<br \/>\n$output = $pre_HTML;<br \/>\nforeach ($comments as $comment) {<br \/>\n$output .= &#8220;\\n&lt;li&gt;&lt;strong&gt;&#8221;.strip_tags($comment-&gt;comment_author)<br \/>\n.&#8221;&lt;\/strong&gt;:&#8221; . &#8221; &lt;a href=\\&#8221;&#8221; . get_permalink($comment-&gt;ID) .<br \/>\n&#8220;#comment-&#8221; . $comment-&gt;comment_ID . &#8220;\\&#8221; title=\\&#8221;on &#8221; .<br \/>\n$comment-&gt;post_title . &#8220;\\&#8221;&gt;&#8221; . strip_tags($comment-&gt;com_excerpt)<br \/>\n.&#8221;&lt;\/a&gt;&lt;\/li&gt;&#8221;;<br \/>\n} $output .= $post_HTML;<br \/>\necho $output; ?&gt;<\/p><\/blockquote>\n<p>\u00a0\u00a0\u00a0 \u53ef\u4ee5\u6309\u7167\u81ea\u5df1\u7684\u9700\u8981\u53bb\u6539\u4e00\u4e9b\uff0c\u6211\u53ea\u7ed9\u8bc4\u8bba\u53d1\u5e03\u8005\u7684\u6635\u79f0\u4f5c\u4e86\u70b9\u989c\u8272\u8c03\u6574\u00b7\u00b7\u00b7\u8fd8\u6709\u4e00\u4e9b\u662f\u8bc4\u8bba\u6700\u591a\u4ee5\u53ca\u6d4f\u89c8\u6700\u591a\u7684\u4ee3\u7801\uff0c\u6211\u5148\u628a\u8bc4\u8bba\u6700\u591a\u7684\u76f4\u63a5\u590d\u5236\u8fc7\u6765\u4e86\uff0c\u4ee5\u4fbf\u65e5\u540e\u9700\u8981:<\/p>\n<blockquote><p>&lt;?php if(function_exists(akpc_most_popular)) { akpc_most_popular($limit = &#8216;8&#8217;, $before = &#8216;&lt;li&gt;&#8217;, $after = &#8216;&lt;\/li&gt;&#8217;); }<br \/>\nelse { $result = $wpdb-&gt;get_results(&#8220;SELECT comment_count,ID,post_title FROM $wpdb-&gt;posts ORDER BY comment_count DESC LIMIT 0 , 10&#8243;);<br \/>\nforeach ($result as $topten) { $postid = $topten-&gt;ID; $title = $topten-&gt;post_title; $commentcount = $topten-&gt;comment_count;<br \/>\nif ($commentcount != 0) { ?&gt;<br \/>\n&lt;li&gt;&lt;a href=&#8221;&lt;?php echo get_permalink($postid); ?&gt;&#8221; title=&#8221;&lt;?php echo $title ?&gt;&#8221;&gt;&lt;?php echo $title ?&gt;&lt;\/a&gt; (&lt;?php echo $commentcount ?&gt;)&lt;\/li&gt;<br \/>\n&lt;?php } } } ?&gt;<\/p><\/blockquote>\n<p>\u00a0\u00a0\u00a0 \u8fd8\u6709\u4e00\u4e9b\u6d4f\u89c8\u6700\u591a\u5566\uff0c\u6700\u70ed\u6587\u7ae0\u5176\u5b9e\u5c31\u662f\u8bc4\u8bba\u6700\u591a\u00b7\u00b7\u00b7\u6211\u628a\u539f\u5e16\u5730\u5740\u4e22\u8fd9\uff0c\u65b9\u4fbf\u9700\u8981\u7684\u540c\u5b66\uff0c\u5982\u8981\u7684\u8bf7\u8fdb<a href=\"http:\/\/wordpress.org.cn\/viewthread.php?tid=29672&amp;highlight=%D7%EE%D0%C2%C6%C0%C2%DB\">\u4f20\u9001\u95e8<\/a>\u3002<\/p>\n<p>\u00a0\u00a0\u00a0 PS\uff1a\u6211\u60f3\u6211\u662f\u4e0d\u662f\u5e94\u8be5\u6dfb\u52a0\u4e2a\u4ee3\u7801\u9ad8\u4eae\u63d2\u4ef6\u6765\u7740\u00b7\u00b7\u00b7\u00b7<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0\u00a0\u00a0 \u6211\u60f3\u5f88\u591a\u4eba\u7684\u4e3b\u9898\u90fd\u81ea\u5e26\u6216\u8005\u81ea\u5df1\u65e9\u5df2\u7ecf\u6dfb\u52a0\u4e0a\u4e86\u8fd9\u4e2a\u529f\u80fd\u4e86\u5427\u3002\u521a\u521a\u5728\u5c0f\u96ef\u5b50\u90a3\u8fb9\u770b\u5230\u7d2b\u96e8\u5144\u5efa\u8bae\u5979\u52a0\u4e0a\u6700\u65b0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[210,211],"class_list":["post-633","post","type-post","status-publish","format-standard","hentry","category-simple_life","tag-210","tag-211"],"_links":{"self":[{"href":"http:\/\/www.lmyoaoa.com\/inn\/wp-json\/wp\/v2\/posts\/633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.lmyoaoa.com\/inn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.lmyoaoa.com\/inn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.lmyoaoa.com\/inn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.lmyoaoa.com\/inn\/wp-json\/wp\/v2\/comments?post=633"}],"version-history":[{"count":0,"href":"http:\/\/www.lmyoaoa.com\/inn\/wp-json\/wp\/v2\/posts\/633\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.lmyoaoa.com\/inn\/wp-json\/wp\/v2\/media?parent=633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.lmyoaoa.com\/inn\/wp-json\/wp\/v2\/categories?post=633"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.lmyoaoa.com\/inn\/wp-json\/wp\/v2\/tags?post=633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}