前言介紹
- 這款 WordPress 外掛「RSSImport」是 2007-03-18 上架。 目前已經下架不再更新,不建議安裝使用。
- 目前有 10000 個安裝啟用數。
- 上一次更新是 2019-12-25,距離現在已有 1957 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 1.5 以上版本才可以安裝。
- 有 16 人給過評分。
- 論壇上目前有 1 個提問,問題解答率 0%
外掛協作開發者
外掛標籤
內容簡介
這款外掛可使用 PHP、小工具或短代碼在您的部落格中顯示 RSS 資訊。此外掛僅使用 WordPress 標準功能,因此不需要外部庫。對於較舊版本的 WordPress,使用內建的MagpieRSS 函式庫。對於 WordPress 2.8 及更新版本,有一個設置可用於啟用內建的SimplePie 函式庫以解析 RSS 資訊。
與您發佈的所有其他內容一樣,請確保您有權 (重新)發佈您將要匯入的 RSS 資訊內容!
您可以將以下代碼插入到 PHP 外掛中或模版,例如 sidebar.php 或 single.php:
範例:
這是使用該外掛所需的最小代碼。 外掛可接受許多參數,以自訂匯入的資訊。 可在下方查看完整的參數列表。 您也可以在文章和頁面中使用短代碼的任何參數。
短代碼範例:
[RSSImport display=”5″ feedurl=”https://bueltge.de/feed/” use_simplepie=”true”]
對於所有 (bool) 參數,您可以使用字符串 true 和false 或整數值 1 和0。
display – 顯示的項目數。預設為 5。
feedurl – RSS 位址。預設為 https://bueltge.de/feed/。
before_desc – 描述前插入的 HTML 或字串。預設為empty。您可以使用一些變數進行替換,請參閱下文。
displaydescriptions – (bool) 設定為 true 時會顯示每個項目的描述。預設為false。
after_desc – 描述後插入的 HTML 或字串。預設為empty。您可以使用一些變數進行替換,請參閱下文。
html – (bool) 設定為 true 時,描述中可以包含 HTML 標記。預設為false。
truncatedescchar – 允許在描述中使用的最大字元數。如果描述長度超過此長度,則截斷至指定的長度。預設為 200,將值設置為空引號 ''則不截斷描述。
truncatedescstring – 在描述被截斷後插入的 HTML 或字串。預設為...
truncatetitlechar – 允許在標題中使用的最大字元數。如果標題超過此值,則將其截斷為指定的長度。預設為'',表示不截斷標題。
truncatetitlestring – 在標題被截斷後插入的 HTML 或字串。預設為 '...'。
before_date – 日期前插入的 HTML 或字串。預設為。
date – (bool) 設定為 true 時會顯示項目的日期。預設為 false。
after_date – 描述後插入的 HTML 或字串。預設為。
date_format – 日期格式字符串。留空以使用 WordPress 安裝的格式。如果需要不同的日期格式,請指定 PHP 日期字符串,例如:F j, Y。參見格式化日期和時間。
原文外掛簡介
Display feeds in your blog, using PHP, a Widget or Shortcode. The plugin uses only standard WordPress functionality, so no external libraries are required. For older versions of WordPress, the built-in MagpieRSS library is used. For WordPress 2.8 and newer, there is a setting available to enable the built-in SimplePie library for parsing feeds.
As with all other content you publish, make sure you are allowed to (re-)publish the content of the feeds you are about to import!
You can insert the following code into a PHP plugin or in a template, for example sidebar.php or single.php:
Example:
This is the minimal code needed for using the plugin. The plugin accepts a number of parameters for customizing the feed content import. See below for the full list of available parameters. You can also use any of the parameters with Shortcode in posts and pages.
Example Shortcode:
[RSSImport display=”5″ feedurl=”https://bueltge.de/feed/” use_simplepie=”true”]
For all (bool) parameters you can either use the strings true and false or the integer values 1 and 0.
display – The number of items to display. Default is 5.
feedurl – The feed address. Default is https://bueltge.de/feed/.
before_desc – The HTML or string to insert before the description. Default is empty. You can use some variables which will be replaced, see below.
displaydescriptions – (bool) When set to true, the description for each entry will be displayed. Default is false.
after_desc – The HTML or string to insert after the description. Default is empty. You can use some variables which will be replaced, see below.
html – (bool) When set to true, the description can include HTML tags. Default is false.
truncatedescchar – The maximum number of characters allowed in descriptions. If the description is longer than this length, it will be truncated to the given length. Default is 200, set the value to empty quotes '' to never truncate descriptions.
truncatedescstring – The HTML or string to insert at the end of a description after it has been truncated. Default is ...
truncatetitlechar – The maximum number of characters allowed in titles. If the title is longer than this value, it will be truncated to the given length. Default is '', which means never truncate titles.
truncatetitlestring – The HTML or string to insert at the end of a title after it has been truncated. Default is ' ... '.
before_date – The HTML or string to insert before the date. Default is .
date – (bool) If true, display the date of the item. Default is false.
after_date – The HTML or string to insert after the date. Default is .
date_format– The date format string. Leave empty to use the format of your WordPress installation. If a different date format is desired, specify a PHP date string, for example: F j, Y. See also the date and time formatting page in the WordPress Codex.
before_creator – The HTML or string to insert before the creator of the item. Default is .
creator – (bool) If true, display the creator of the item. Default is false.
after_creator – The HTML or string to insert after creator of the item. Default is .
start_items – The HTML or string to insert before the list of items. Default is
- .
end_items – The HTML or string to insert after the list of items. Default is
.
start_item – The HTML or string to insert before each item. Default is
end_item – The HTML or string to insert after each item. Default is
. You can use some variables which will be replaced, see below.
target – The string to use for the target attribute on links. Default is empty. Valid options are blank, self, parent, top.
rel – The string to use for the rel attribute on links. Default is empty. Valid options are nofollow and follow.
desc4title – The description to use in the title attribute on item title links. Default is false.
charsetscan – (bool) If true, scan the feed content for the correct character set. This may cause the content to load more slowly. Use this option if you’re having problems with feed content being displayed with stranged characters. Default is false.
debug – (bool) If true, activate debug-mode, which will echo the Magpie object as an array. Default is false. Only use this option for debugging.
before_noitems – The HTML or string to insert before the no items message. Default is
.
noitems– The message to display when the feed is empty. Default is No items, feed is empty..
after_noitems – The HTML or string to insert before the no items message. Default is
.
before_error – The HTML or string to insert before the error message. Default is
.
error – Error message displayed when there is an error loading or displaying the feed. Default is Error: Feed has an error or is not valid.
after_error – The HTML or string to insert before the error message. Default is
.
paging – (bool) If true, enable pagination. Default is false.
prev_paging_link – The name of the previous page link. Default is « Previous.
next_paging_link – The name next page link. Default is Next ».
prev_paging_title – The title attribute of the previous page link. Default is more items.
next_paging_title – The title attribute of the next page link. Default is more items.
use_simplepie – (bool) If true, use SimplePie to parse the feed. SimplePie is included in WordPress 2.8 and newer and can parse both RSS and ATOM feeds. Default is false if used with Shortcode, true if used with the PHP function.
view – (bool) If true, calling the RSSImport() function will print the rendered HTML directly to the output. If false, the rendered HTML will be returned by the function as a string value and nothing will be output. Default when using PHP code is true. Default when using Shortcode is false.
random_sort – (bool) If true, Items will be displayed in random order. Default when using Shortcode is false.
order – (string) Order of the filds Date, Title, Creator, Description. Use a comma separated string for your order. Default is date,title,creator,description
The parameters before_desc, after_desc, start_item and end_item accepts the following variables which will be replaced:
%title% for the title of the entry
%href% for the entry’s URL
%picture_url% for the URL of a thumbnail image for the entry if available. To use this variable, SimplePie is required to be enabled (use_simplepie="true")
If pagination is enabled, it adds a div with the class rsspaging to enable easier styling with CSS. You can also style the previous and next links, which have the classes: rsspaging_prev and rsspaging_next.
You can use any of the parameters in the php function RSSImport() in your templates or with the Shortcode [RSSImport] in posts and pages.
Examples
Using the PHP function with many parameters:
RSSImport(
$display = 5, $feedurl = 'https://bueltge.de/feed/',
$before_desc = '', $displaydescriptions = false, $after_desc = '', $html = false, $truncatedescchar = 200, $truncatedescstring = ' ... ',
$truncatetitlechar = '', $truncatetitlestring = ' ... ',
$before_date = ' ', $date = false, $after_date = '',
$before_creator = ' ', $creator = false, $after_creator = '',
$start_items = '
- ', $end_items = '
',
$start_item = '
'
);
Please note that for the PHP function the parameters are expected in the order in which they are defined in the above list. Thus if you skip one parameter, you will also have to skip all of the subsequent parameters.
Using Shortcode with several parameters:
[RSSImport display="10" feedurl="https://your_feed_url/"
displaydescriptions="true" html="true"
start_items="
- " end_items="
" paging="true" use_simplepie="true"]
Add a “more” link to the output:
RSSImport(
$display = 5,
$feedurl = 'https://bueltge.de/feed/',
$before_desc = '',
$displaydescriptions = true,
$after_desc = ' show more'
);
or
[RSSImport feedurl="https://wordpress.org/news/feed/" after_desc=" show more" displaydescriptions="true" use_simplepie="true"]
Enable Thumbnail Pictures:
RSSImport(
$display = 5,
$feedurl = 'https://bueltge.de/feed/',
$before_desc = '',
$displaydescriptions = true
);
or
[RSSImport feedurl="https://wordpress.org/news/feed/" displaydescriptions="true" before_desc="
" use_simplepie="true"]
Acknowledgements
Thanks to Dave Wolf for the idea, to Thomas Fischer and Gunnar Tillmann for better code and Ilya Shindyapin, http://skookum.com for the idea and solution of pagination.
License
Good news, this plugin is free for everyone! Since it’s released under the GPL, you can use it free of charge on your personal or commercial blog. But if you enjoy this plugin, you can thank me by leaving a small donation for the time I’ve spent writing and supporting this plugin. And I really don’t want to know how many hours of my life this plugin has already eaten 😉
Translations
The plugin comes with various translations, please refer to the WordPress Codex for more information about activating the translation. Please helpt to translate or improve the translations of this plugin.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「RSSImport」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
4.1 | 4.3 | 4.4 | 4.2.2 | 4.2.3 | 4.4.8 | 4.4.9 | 4.5.0 | 4.5.1 | 4.6.0 | 4.6.1 | trunk | 4.4.10 | 4.4.11 | 4.4.12 | 4.4.13 | 4.4.14 | 4.4.15 | 4.4.16 | 4.4.17 | 4.4.18 | RSSImportTwo |
延伸相關外掛(你可能也想知道)
oAuth Twitter Feed for Developers 》一個符合 Twitter API 1.1 規範的 WordPress 外掛,為主題開發人員提供從 Twitter 使用者時間線取得物件陣列的功能。, 新的 Twitter API 需要您進行 oAuth 認...。
RSS for Yandex Turbo 》此外掛可自動在您的網站上建立新的 RSS 訂閱 (或多個訂閱),以完全符合雅虎 "Turbo" 的 技術要求。, 安裝後請務必檢查在 "設定 / 雅虎 Turbo" 中的插件設置。...。
GN Publisher: Google News Compatible RSS Feeds 》GN Publisher 是一個能製作符合Google News RSS Feed 技術要求並包含您的網站在Google News Publisher Center的外掛。, 這個外掛解決了使用 Google News Publ...。
Super RSS Reader – Add attractive RSS Feed Widget 》Super RSS Reader 外掛允許您以優美的方式在 widget 中顯示 RSS 訂閱。它有選項可以在單個 widget 中顯示多個 RSS 訂閱,並具有添加類似新聞滾動條的功能。完...。
RSS Includes Pages 》此外掛會修改 RSS 訂閱,以便訂閱中包含頁面 (Page) 並非僅有文章 (Post)。停用此外掛,就會還原 RSS 訂閱至預設模式。, 當您將 WordPress 用作內容管理系統 ...。
FeedWordPress 》, 作者:C. Johnson, 項目網址:http://feedwordpress.radgeek.com/, 授權:遵循 GPL 2 進行授權。有關版權信息的詳細說明請參閱下文的授權。, , FeedWordPre...。
Easy Twitter Feed Widget Plugin 》Easy Twitter Feed Widget 外掛使用 Twitter Widget,不需建立 API 即可在 WordPress 網站上顯示推文,不需要建立 Twitter 應用程式。該外掛提供方便的介面,...。
WP Telegram Widget and Join Link 》p>使用簡單的短代碼,在 WordPress Widget 或任何地方顯示 Telegram 公開頻道或群組的動態線。, 卓越的支援, 參加聊天室, 我們在 Telegram 上設有一個公開小...。
Twitter Widget Pro 》這是一個小工具,能夠正確地處理 Twitter 資訊,包括將 @username、#hashtag 和網址解析成連結。它支援顯示個人資料照片,並且允許您控制是否顯示推文的時間...。
RSS for Yandex Zen 》這個外掛將自動在您的網站上創建符合 Yandex 的技術要求 的新 RSS Feed,提供給 Yandex Zen 服務使用。, 安裝外掛後,請務必檢查 “Yandex Zen 設置 ...。
Send Images to RSS 》Send Images to RSS 可以縮小您 RSS 資料中的圖片,以合適的尺寸呈現在 Email 上,讓更多人能夠在 Email 中看到您的內容。即使螢幕大小、螢幕呈現質量、圖片...。
Podcast Importer SecondLine 》使用 Podcast Importer SecondLine 外掛,自動同步播客 RSS 供稿到 WordPress 網站。此外掛容易將播客匯入 WordPress,可將播客匯入常規 WordPress 文章或自...。
Kebo Twitter Feed 》Kebo Twitter Feed 是一個方便且易用的外掛,讓您可以輕鬆地將 Twitter 資訊加入您的網站中。只需使用幾個點擊即可開始,無需設置自己的 Twitter App。使用提...。
Category Specific RSS feed Subscription 》這個 WordPress 外掛允許您為您的網站訪客提供多個 RSS 訂閱選項的菜單,除了您正常的 RSS 訂閱選項之外。, 如果您的網站涵蓋多個主題,那麼當您更新不是他們...。
Widgets for Social Photo Feed 》**總結:**, 透過我們的反應靈敏Instagram Feed Widgets,免費在2分鐘內展示你的Instagram動態。這款免費外掛讓在你的網站任何地方整合Instagram小部件變得輕...。