Extension:RSS
|
RSS Release status: experimental |
|||
|---|---|---|---|
| Implementation | Tag | ||
| Description | Displays an RSS feed on a wiki page | ||
| Author(s) | Kellan Elliott-McCrea, mutante, Daniel Kinzler, Rdb, Mafs, Alxndr, Wikinaut, Chris Reigrut, K001, Jeroen De Dauw, Jack Phoenix, Mark A. Hershberger | ||
| Last version | 1.9 (15 August 2011) | ||
| MediaWiki | 1.17+ | ||
| License | GPL | ||
| Download | Download snapshot Subversion [Help] |
||
|
|||
|
|||
|
Check usage (experimental) |
|||
The RSS extension displays an RSS feed on a wiki page in a standard or user-definable format. It is flagged as experimental, because the current version fails to show many variants of RSS feeds, if not the majority. It is admitted, that the extension urgently needs fixes. --Wikinaut 14:33, 25 August 2011 (UTC)
Contents |
[edit] Installation
Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.
- Download the files into
$IP/extensions/RSS - Place the following text in your LocalSettings.php file: require_once("$IP/extensions/RSS/RSS.php");
- Installation can now be verified through your wiki's Special:Version
[edit] Usage
Use one section between <rss>-tags for each feed. The rss element may contain parameters if you provide them as attributes to the rss element:
| parameter (optional) | comment |
|---|---|
template="name" |
'name' (default: rss-item) is the name of a page in the MediaWiki template namespace (default: MediaWiki:Rss-item), which is a template which comprises the name of another template (default: Template:RSSPost) and a list of named variables of RSS Feed channel subelements (item), these values then being passed to this other template to finally format the RSS items |
templatename="Pagename" or
|
'Pagename' is the name of a template page which is used in the default template MediaWiki:Rss-item (defining the channel subelements) to finally format the RSS items; the template can be in the template namespace (first example denotes a page Template:Pagename) or any other namespace (second example uses the full specified form Namespace:Pagename) |
max="n" |
show at most n channel subelements (items) |
highlight="term1 term2 ..." |
highlight terms in different colours |
filter="term1 term2 ..." |
show only RSS items with at least one of the terms |
filterout="term1 term2 ..." |
do not show any RSS item containing any of these terms |
reverse |
display the RSS items in reverse order |
This extension supports filtering-out (i.e. grep -v) items based on title when in short list mode.
[edit] Templates for channel subelements and styling the RSS Feed
If a template is not specified, then the one in MediaWiki:Rss-item is used and determines which RSS feed channel subelements (items) are used.
This is by default (until extension version 1.8)
{{ RSSPost | title = {{{title}}} | link = {{{link}}} | date = {{{date}}} | author = {{{author}}} }}
This is the new template, suggested and proposed for implementation in version 1.9+
{{ RSSPost | title = {{{title}}} | link = {{{link}}} | date = {{{date}}} | author = {{{author}}} | description = {{{description}}} }}
The selected items are passed to another template Template:RSSPost which determines how the RSS Feed is rendered on the wiki pages. It iterates over each <item> of the RSS feed and substitutes the value of each element found there, e.g. <title>, <link>, <date>, <author>, etc.
[edit] Example
The following code renders the 5 recent items of the wikimedia blog feed on the present page and highlights some terms. The layout depends on the content of feed template Template:RSSPost and also of the item template MediaWiki:Rss-item as mentioned above:
<rss max=5 highlight="wiki foundation public donation research community">http://blog.wikimedia.org/feed/</rss>
- Olá Wikimedians! Meeting donors and editors in Brazil this March
- This March, the Community Department will be heading to Brazil to talk with supporters of Wikimedia’s mission. Our aim is to better understand how Portuguese-speaking editors and donors, many of whom are located in Brazil, view Wikipedia and the projects, in order to better tailor the fundraiser and all our programs to them. First up, [...]
- — Fri, 03 Feb 2012 18:44:36 +0000
- Wikimedia in Tunisia
- Yesterday, we wrapped up our visit to Tunisia, which comes as part of our Arabic language initiative that WMF launched earlier in October 2011 with the Doha convening. Our initial outreach activities mainly rely on meetings with the small Wikipedia community scattered in Arabic speaking countries and exploring the possibilities of expansion of those communities, [...]
- — Thu, 02 Feb 2012 00:42:28 +0000
- Wikimedia Research Newsletter, January 2012
- Vol: 2 • Issue: 1 • January 2012 [archives] Language analyses examine power structure and political slant; Wikipedia compared to commercial databases With contributions by: Tbayer and Piotrus Contents 1 Admins influence the language of non-admins 2 Can Wikipedia replace commercial biography databases? 3 Students predict connections between Wikipedians 4 Language analysis finds Wikipedia’s political [...]
- — Tue, 31 Jan 2012 17:08:43 +0000
- Getting ready for when the freeze is done
- When you look at the “sprint backlog” in mingle (guest, guest), you may notice that even though we have been slowed down because of the slush, the feature freeze because of the imminent MediaWiki release, we are not sitting on our hands. Documentation, testing, code review and outreach is on our agenda. Because of the [...]
- — Tue, 31 Jan 2012 08:28:52 +0000
- October 2011 Coding Challenge winners
- In October 2011, we tried a new experiment in attracting volunteer developers and advertising opportunities to get involved with Wikimedia’s open source codebase. The October 2011 Coding Challenge invited developers to submit projects in three categories: Mobile Wikipedia: Uploading images and other media via your smartphone Slideshows: Showcase Wikipedia’s beautiful multimedia Realtime: Surface changes to Wikipedia’s [...]
- — Tue, 31 Jan 2012 03:24:13 +0000
[edit] Configuration settings
| parameter | default | comment |
|---|---|---|
| $wgRSSCacheAge | 3600 (one hour) | Store entries in memcached for this many seconds |
| $wgRSSCacheCompare | false | Check cached content, if available, against remote. $wgRSSCacheCompare should be set to false or a timeout in seconds which is less than $wgRSSCacheAge after which a comparison will be made. |
| $wgRSSFetchTimeout | 5 | read timeout in seconds |
| $wgRSSUserAgent | 'MediaWikiRSS/0.01 (+http://www.mediawiki.org/wiki/Extension:RSS) / MediaWiki RSS extension' | User-Agent to use for fetching feeds |
| $wgRSSNamespaces | null | Ignore the RSS tag in all but the namespaces listed here
|
| $wgRSSAllowedFeeds | array() | URL whitelist of RSS Feeds: if there are items in the array, and the used URL isn't in the array, it will not be allowed (originally proposed in bug 27768) |
| $wgRSSProxy | false | Optional proxy server to be used for fetching feeds false: no proxy used |
[edit] Technical history
RSS extension is a modified version of
- the RSS engine from Mafs, which is a modified version of
- the RSS engine from Rdb78, which is a modified version of
- the RSS engine from Duesentrieb, which is a modified version of
- the RSS-feed extension by Mutante.
[edit] Change Log
- original by mutante 25.03.2005
- extended by Duesentrieb 30.04.2005
- extended by Rdb78 07.07.2005
- extended by Mafs 10.07.2005, 24.07.2005
- extended by Niffler 28.02.2006
- modified by Dzag 07.2006
- modified by Alxndr 09.2006
- modified by Svanslyck 02.2008, replacing all « and » with "
This has been updated to work better on newer (1.9) MediaWiki software, with the help of User:Duesentrieb. --CryptoQuick 14:26, 24 January 2007 (UTC)- This appears not to be true; I have received numerous emails about it not working with 1.9+. I would love to help debug and fix the extension, but my host has not upgraded to PHP 5 and I'm thus stuck at MediaWiki 1.6.8, so that's as far as this is guaranteed to work properly. If anyone develops a fix, please post a link to it here! —Alxndr (t) 02:02, 16 June 2007 (UTC)
- modified by --Wikinaut 11:17, 7 May 2008 (UTC) : changed method to disable chaching; Extension is now compatible to MediaWiki 1.12
- modified by Cmreigrut 19:05, 19 November 2008 (UTC): added date (if specified) to short output
- modified by Peter Newman: 03:15, 7 October 2009 (UTC) Added htmlspecialchars escaping to the displayed strings
- modified by K001 15:15, 26 January 2010 (UTC): version 1.6, added support for date formats
[edit] Version 1.7
2010-7-23
- Cleaned up, included MagpieRSS library and put onto the WMF subversion repository by Jeroen De Dauw
- i18n file added by TranslateWiki.net people
[edit] Version 1.8
2010-10-19
- Removed dependencies on Snoopy in favor of MediaWiki's internal HttpRequest and removed MagpieRSS (perhaps to be replaced later with SimplePie) because of concerns about MagpieRSS's security problems and lack of maintenance.
- Added ability to do more with the layout of RSS feeds.
[edit] See also
Alternate extensions:
- http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/RSSNews/
- Extension:RSS Reader
- More: Category:RSS extensions
|
|
This extension is being used on one or more of Wikimedia's wikis. This means that the extension is stable and works well enough to be used by such high traffic websites. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |