{"id":1204,"date":"2010-12-08T05:10:45","date_gmt":"2010-12-08T05:10:45","guid":{"rendered":"http:\/\/chan.nds.hk\/blog\/?p=1204"},"modified":"2010-12-08T05:10:45","modified_gmt":"2010-12-08T05:10:45","slug":"wordpress-%e7%82%ba%e7%b6%b2%e5%9d%80%e5%8a%a0%e5%85%a5rss%e8%bc%aa%e6%92%ad","status":"publish","type":"post","link":"https:\/\/chan.nds.hk\/blog\/?p=1204","title":{"rendered":"wordpress &#8211; \u70ba\u7db2\u5740\u52a0\u5165rss\u8f2a\u64ad"},"content":{"rendered":"<p><span class=\"Apple-style-span\" style=\"color: rgb(51, 51, 51); font-family: Arial, Helvetica, sans-serif; font-size: 18px; line-height: 28px; \">Simply RSS Fetcher<\/span><\/p>\n<p>\u76f8\u7576\u597d\u5be6\u7528\uff0c\u53ef\u4ee5\u70ba\u4f60\u7684\u7db2\u5740\u52a0\u5165rss\u8f2a\u64ad\u529f\u80fd\uff0c\u63d2\u5165\u4f60\u559c\u6b61\u7684rss \u6587\u7ae0\uff0c\u7576\u7136\u8981\u652f\u63f4rss\u7684\u7db2\u7ad9\u624d\u884c\u5566\u3002<\/p>\n<p>\u5b89\u88dd\u597d\u63d2\u4ef6\u5f8c\u4e5f\u6c92\u4ec0\u9ebc\u96d6\u8981\u8a2d\u5b9a\uff0c\u5553\u7528\u5c31\u884c\uff0c\u4e0d\u904e\u60f3\u8981\u63d2\u5165rss\u5462\uff0c\u5c31\u8981\u641e\u5c11\u5c11\u52d5\u4f5c\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u555f\u7528Simply RSS Fetcher\u5916\u639b\u4e4b\u5f8c\uff0c\u8acb\u5728\u4f60\u7684THEME\u4f48\u666f\u4e3b\u984c\u7684\u4f60\u559c\u6b61\u7684\u5730\u65b9\u52a0\u4e0a\uff1a<\/p>\n<p>&lt;?php srssfetcher(&#39;http:\/\/RSS\u7db2\u5740\/&#39;, 5, true, false, true, false); ?&gt;<\/p>\n<p>\u9019\u6a23\u7684\u63a7\u5236\u78bc\u5373\u53ef\u3002<\/p>\n<p>\u5982\u679c\u4f60\u6015\u5916\u639b\u51fa\u554f\u984c\u6642\u6574\u500b\u7db2\u9801\u6703\u5361\u5728\u4e00\u534a\uff0c\u53ef\u4ee5\u52a0\u4e0a\u4e00\u500b\u5224\u65b7\u7684\u898f\u5247\uff1a<\/p>\n<p>&lt;?php if (function_exists(&#39;srssfetcher&#39;)) srssfetcher(&#39;http:\/\/RSS\u7db2\u5740\/&#39;, 5, true, false, true, false); ?&gt;<!--more--><\/p>\n<p>&nbsp;<\/p>\n<p>\u4ed6\u6703\u5148\u5224\u65b7\u529f\u80fd\u662f\u5426\u5b58\u5728\uff0c\u6709\u529f\u80fd\u5247\u986f\u793a\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u53c3\u6578\u8aaa\u660e\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;?php srssfetchers(&#39;feed&#39;, [msgs], [list], [timestamp], [linked], [encode_utf8]); ?&gt;<\/p>\n<p>feed\uff1aRSS\u7db2\u5740\uff0c\u4e00\u822c\u90e8\u843d\u683c\u3001twitter\u3001\u65b0\u805e\u7db2\u7ad9\u7684RSS\u4f86\u6e90\u7686\u53ef\u3002<\/p>\n<p>msgs\uff1a\u986f\u793a\u7684\u6a19\u984c\u6578\u91cf\u3002<\/p>\n<p>list\uff1a\u662f\u5426\u4ee5\u6e05\u55ae\u65b9\u5f0f\u986f\u793a\uff0c\u53ef\u8a2d\u5b9a\u70batrue\u6216false\u3002<\/p>\n<p>timestamp\uff1a\u662f\u5426\u986f\u793a\u767c\u6587\u6642\u9593\uff0c\u53ef\u8a2d\u5b9a\u70batrue\u6216false\u3002<\/p>\n<p>linked\uff1a\u662f\u5426\u52a0\u4e0a\u8a72\u7db2\u5740\u7684\u8d85\u9023\u7d50\uff1f\u53ef\u8a2d\u5b9a\u70batrue\u6216false\u3002<\/p>\n<p>encode_utf8\uff1a\u662f\u5426\u4ee5utf8\u7de8\u78bc\u986f\u793a\u6587\u5b57\u5167\u5bb9\uff1f\u53ef\u8a2d\u5b9a\u70batrue\u6216false\u3002<\/p>\n<p>\u5982\u679c\u4f60\u8a2d\u5b9a\u597d\u4e4b\u5f8c\uff0c\u767c\u73fe\u6587\u5b57\u5448\u73fe\u4e82\u78bc\uff0c\u8acb\u8abf\u6574\u300cencode_utf8\u300d\u9019\u53c3\u6578\u7684true\u6216false\u3002\u53e6\u5916\uff0c\u6211\u5011\u4e5f\u53ef\u81ea\u884c\u8a2d\u5b9aRSS\u7684\u66f4\u65b0\u983b\u7387\uff0c\u8acb\u4fee\u6539\u300csrssfetcher.php\u300d\u6a94\u6848\u7b2c30\u884c\u5de6\u53f3\u7684\u5730\u65b9\uff08120\u8868\u793a120\u79d2\u66f4\u65b0\u4e00\u6b21\uff09\uff1a<\/p>\n<p>define(&#39;MAGPIE_CACHE_AGE&#39;, 120);<\/p>\n<p>&nbsp;<\/p>\n<p>\u5982\u679c\u4f60\u5e0c\u671b\u6309\u4e0b\u6a19\u984c\u5f8c\u53ef\u4ee5\u958b\u65b0\u8996\u7a97\u986f\u793a\u9801\u9762\uff0c\u8acb\u4fee\u6539\u300csrssfetcher.php\u300d\u6a94\u6848\u7b2c70\u884c\u5de6\u53f3\u7684\u5730\u65b9\uff0c\u52a0\u4e0a\u300ctarget=&quot;_blank&quot;\u300d\u5373\u53ef\u3002<\/p>\n<p>\u8cc7\u6599\u51fa\u8655\u300c\u91cd\u704c\u72c2\u4eba\u300d<\/p>\n<p>\u9019\u500b\u63d2\u4ef6\u7f3a\u9ede\u5c31\u662f\u592a\u7c21\u77ed\uff0c\u4e0d\u904e\u5462\uff0c\u6709\u5f97\u7528\u5c31\u662f\uff0c\u9084\u6709\u4e00\u500b\u82f1\u6587\u7684\uff0c\u770b\u4f86\u4e5f\u4e0d\u932f\uff0c\u90fd\u5b89\u4f86\u8a66\u7528\u4e00\u4e0b\u7b97\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>SmartRSS Plugin is a WordPress plugin<\/p>\n<p>&nbsp;<\/p>\n<p>Transform your blog into an automated posting tool by syndicating with multiple RSS feed sources!<\/p>\n<p>&nbsp;<\/p>\n<p>Features:<\/p>\n<p>- administration tool for managing rss feeds<\/p>\n<p>- each feed can be assigned to a specific category<\/p>\n<p>- after importing the feed, you may display related feeds by using the provided code below<\/p>\n<p>- cron job for importing feeds as a scheduled period<\/p>\n<p>&nbsp;<\/p>\n<p>Package contains:<\/p>\n<p>&nbsp;<\/p>\n<p>- smart_rss.php file - the backend plugin<\/p>\n<p>- wp_smartrss.php - the cron job file which does the import<\/p>\n<p>&nbsp;<\/p>\n<p>Installation:<\/p>\n<p>&nbsp;<\/p>\n<p>- upload files smart_rss.php to the wp-content\/plugins directory of your wordpress installation<\/p>\n<p>- go into your Plugins administrator tab and activate it<\/p>\n<p>- you will be able to access the plugin backend by going to the Options tab -&gt; the SmartRss subtab<\/p>\n<p>- upload wp_smartrss.php to your wordpress home path, for security reasons i would suggest you rename this file to something you like<\/p>\n<p>- to start importing fields go to http:\/\/sitename\/wp_smartrss.php url, if you would like to do this automatically you can setup a cron job to run that file<\/p>\n<p>- to setup the cron job use a code similar to this:<\/p>\n<p>&nbsp;<\/p>\n<p>&ldquo;nice &ndash;adjustment=19 \/usr\/bin\/php \/$full-path-to-the-file\/wp_smartrss.php&rdquo;<\/p>\n<p>or<\/p>\n<p>&ldquo;nice &ndash;adjustment=19 \/usr\/bin\/php \/$full-path-to-the-file\/your_file_name.php&rdquo;<\/p>\n<p>&nbsp;<\/p>\n<p>- if you would like to put this file somewhere else on the server, you need to edit the line from the file wp_smartrss.php containing<\/p>\n<p>require_once(&rsquo;wp-config.php&rsquo;);<\/p>\n<p>and replace it with something like<\/p>\n<p>like require_once(&rsquo;\/$full-path-to-wordpress\/wp-config.php&rsquo;);<\/p>\n<p>where $full-path-to-wordpress is the full path to your wordprss installation folder<\/p>\n<p>&nbsp;<\/p>\n<p>Related Articles Display<\/p>\n<p>&nbsp;<\/p>\n<p>- to display the related articles add this code in your single.php page from your template directory:<\/p>\n<p>&nbsp;<\/p>\n<p>&lt; ?php related_posts(5, 10, &#39;&lt;li&gt;&lt;b style=&quot;font-size:14px;&quot;&gt;&#39;, &#39;&lt;\/b&lt;&#39;, &#39;&#39;, &#39;&#39;, false, false); ?&gt;<\/p>\n<p>&nbsp;<\/p>\n<p>Function parameters: smartrss_related_posts(limit, len, before_title, after_title , before_post, after_post , show_pass_post, show_limit)<\/p>\n<p>- limit = the related posts limit to be displayed<\/p>\n<p>- len = if show_limitis set then it will limit the post size to $len words<\/p>\n<p>- before_title = html code to add before post title<\/p>\n<p>-after_title = html code to add after post title<\/p>\n<p>-before_post = html code to add before post<\/p>\n<p>-after_post =html code to add after post<\/p>\n<p>-show_past_post = include posts that are password protected<\/p>\n<p>-show_limit = limit the post text to $len words<\/p>\n<p><span class=\"Apple-style-span\" style=\"color: rgb(0, 0, 0); font-family: 'Lucida Grande', Verdana, Arial, sans-serif; line-height: 19px; \"><strong style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \">Demo link:&nbsp;<\/strong><a alt=\"Smart Rss Demo\" href=\"http:\/\/www.devplug.net\/\" style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(204, 51, 0); text-decoration: none; \">http:\/\/www.devplug.net<\/a><\/span><\/p>\n<p>\u4e0b\u8f09:http:\/\/www.devplug.net\/download\/smartrss.zip<\/p>\n","protected":false},"excerpt":{"rendered":"<a href=\"https:\/\/chan.nds.hk\/blog\/?p=1204\"><img width=\"150\" height=\"150\" src=\"https:\/\/chan.nds.hk\/blog\/wp-content\/plugins\/thumbnail-for-excerpts\/tfe_no_thumb.png\" class=\"alignleft wp-post-image tfe\" alt=\"\" title=\"\" \/><\/a><p>Simply RSS Fetcher \u76f8\u7576\u597d\u5be6\u7528\uff0c\u53ef\u4ee5\u70ba\u4f60\u7684\u7db2\u5740\u52a0\u5165rss\u8f2a\u64ad\u529f\u80fd\uff0c\u63d2\u5165\u4f60\u559c\u6b61\u7684rss \u6587\u7ae0\uff0c\u7576\u7136\u8981\u652f\u63f4rss\u7684\u7db2\u7ad9\u624d\u884c\u5566\u3002 \u5b89\u88dd\u597d\u63d2\u4ef6\u5f8c\u4e5f\u6c92\u4ec0\u9ebc\u96d6\u8981\u8a2d\u5b9a\uff0c\u5553\u7528\u5c31\u884c\uff0c\u4e0d\u904e\u60f3\u8981\u63d2\u5165rss\u5462\uff0c\u5c31\u8981\u641e\u5c11\u5c11\u52d5\u4f5c\u3002 &nbsp; \u555f\u7528Simply RSS Fetcher\u5916\u639b\u4e4b\u5f8c\uff0c\u8acb\u5728\u4f60\u7684THEME\u4f48\u666f\u4e3b\u984c\u7684\u4f60\u559c\u6b61\u7684\u5730\u65b9\u52a0\u4e0a\uff1a &lt;?php srssfetcher(&#39;http:\/\/RSS\u7db2\u5740\/&#39;, 5, true, false, true, false); ?&gt; \u9019\u6a23\u7684\u63a7\u5236\u78bc\u5373\u53ef\u3002 \u5982\u679c\u4f60\u6015\u5916\u639b\u51fa\u554f\u984c\u6642\u6574\u500b\u7db2\u9801\u6703\u5361\u5728\u4e00\u534a\uff0c\u53ef\u4ee5\u52a0\u4e0a\u4e00\u500b\u5224\u65b7\u7684\u898f\u5247\uff1a &lt;?php if (function_exists(&#39;srssfetcher&#39;)) srssfetcher(&#39;http:\/\/RSS\u7db2\u5740\/&#39;, 5, true, false, true, false); ?&gt;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[111],"tags":[1561],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/chan.nds.hk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1204"}],"collection":[{"href":"https:\/\/chan.nds.hk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chan.nds.hk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chan.nds.hk\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/chan.nds.hk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1204"}],"version-history":[{"count":0,"href":"https:\/\/chan.nds.hk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1204\/revisions"}],"wp:attachment":[{"href":"https:\/\/chan.nds.hk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chan.nds.hk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chan.nds.hk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}