出典: Wikia
| RSS2Wiki
|
|
| 区分
| パーサーフック
|
| 対象
| 全利用者
|
| 実装状況
| 全プロジェクト
|
ウィキアでは、タグを使うことで記事中にRSSを表示させることができます。
[編集] 使用方法
書式は以下の通りです。
<rss>RSSフィードのURL|オプション1|オプション2|...</rss>
最低限必要なのはRSSフィードのURLのみですが、オプションを指定することでRSSの出力結果を制御できます。
- charset= - 文字コードを指定します。UTF-8などが指定できます。
- short - 指定すると、個々のフィードの詳細な文章を表示しません。
- date - 指定すると、個々のフィードの日時を表示します。
- max= - 表示するアイテム数を指定します。
- highlight=term1 term2 - 指定した単語が強調されます。半角空白で複数指定できます。
- filter=term1 term2 - 指定した単語の記事のみ表示されます。shortを指定時のみ有効です。
- filterout=term1 term2 - 指定した単語の記事が表示から消されます。
- reverse - ならび順序を逆にします。
以下がその例になります。
<rss>http://blogs.mozilla-japan.org/news/feed/|date|max=3|charset=UTF-8</rss>
[編集] 外部リンク
ここのある文書は、Help Wikiaのものです。もし、ご提案がある場合は、
こちらにお願いします。
- This extension is enabled by default on Wikia.
The RSS2Wiki extension allows you to embed RSS feeds from any site onto a Wikia page. This could be used to display news feeds with timely information on your subject, to show entries from a related blog, or to show recent changes from another wiki.
How do I add the RSS feed to a wiki page?
Locate the URL for a feed you would like to include, usually by clicking an "RSS" button or link on the page providing the feed. Copy the URL from the address bar.
The basic code to add an RSS feed to a page is:
<rss>URL goes here</rss>
How can I customize the feed?
There are a number of parameters you can add after the URL for the RSS feed to customize the display outpt. Each is separated by a pipe ("|") (as in links and templates). The available parameters are:
| short
| Shows only the headline for each news item, not the description text.
|
| date
| Shows the date/time stamp for each news item
|
| max=x
| Allows you to choose the maximum number of items to show.
|
| highlight=term1 term2
| The terms added here (separated by a space) are highlighted.
|
| filter=term1 term2
| Only RSS items containing at least one of the listed terms are shown.
|
| filterout=term1 term2
| No RSS items containing the listed terms are shown.
|
| reverse
| The RSS items are displayed in reverse order
|
| charset=
| The charset used by the feed. For example, you may need to use UTF-8 to view some characters.
|
Example
To add some headlines from Google News inside a box, you might use:
<div class="toc" style="width:80%; margin:auto;">
'''Today's U.S. Headlines:'''
<rss>http://news.google.com/news?ned=us&topic=h&output=rss|charset=UTF-8|short|date|max=4</rss>
</div>
This would give you:
Can I embed feeds from my own wiki?
Yes, MediaWiki provides web feeds in both RSS and Atom formats for all history pages and many special pages, including Special:RecentChanges, Special:NewPages, and Special:WantedPages. You can use the RSS URL, in combination with RSS2Wiki, to display portions of these lists on other pages on your wiki.