Summary: How to add an RSS feed to a page
Questions answered by this recipe
Adding an RSS feed to your page.
Use the rss feed from another site, or your own, to be displayed on your wiki.
For example, include the most recent changes.
(That could also be done with a [include:RecentChanges]], but when using a parser you can easily change the look, or display only the top 10 changes.)
This is also a good way to display images dynamically from Flickr.
This recipe uses RSS parser Magpie.
Your host must allow outgoing http requests.
How do I check if my host allows outgoing http requests?
Try to include an external url with this markup : IncludeUrl
Is this a setting I need to change in the Apache config file(s)?
Try it? ( I will try to make a test script soon)
Download rssdisplay.zipΔ. This archive already constains MagpieRSS.
Extract the archive into your PmWiki folder.
Add following line to
Create a cache-directory
to avoid having the rss feed fetched a zillion times a day.
Ensure the directory is writable for the webserver (chmod 777).
Add into local/config.php:
$MagpieEnableCache = true;
Please note that this recipe is inherently insecure.
Never allow untrusted users use RSS markup, they could include feed with malicious content.
Also be sure to add only trustworthy feeds.
(:RSS http://example.com/rss.xml [long|short] [noheader] [number_of_items] :)
- display only titles (short) or also descriptions (long) of feed items
- number of items to display, -1 means all items
- noheader will hide header of feeds
This will display the items in a default display mode with a default maximum of items:
(:RSS http://example.com/rss.xml :)
To display a short format and a max of 5 items use:
(:RSS http://example.com/rss.xml short 5 :)
List of configuration variables with their respective default values:
- default number of displayed items of feed (default 30)
- default format of displayed items of feed (default 'long')
- cache directory ("
- cache item timeout (2 hours)
- proxy server, use syntax
- timeout for fetching RSS feeds (15)
- use gzip compression for fetching feeds
- directory where Magpie is installed (
- encoding of content produced by feed reeder (defaults to
- output error messages from Magpie.
To properly display non-ASCII characters you need to define proper encoding of PmWiki pages.
The best way is to swich PmWiki to Unicode by inserting this line at the beginning of
Be warned that it breaks special characters you already have in existing pages.
See PmWiki:Internationalizations for details.
Change log / Release notes
|2011-11-30|| ||New rewritten version (Anomen)|
|2005-10-30||1.32||Added html_entity_decode for the rss-url (thanks to JohnCooley?)|
| || ||Added some utf8 translation to html entities|
| || ||Cleaned the Comments & Bugs list below a bit|
|2005-10-18||1.31||Looks like the htmlspecialchars stuff was not a good thing|
|2005-10-11||1.30||replaced ',' with space as seperator;setting error_reporting to zero;cleaned up html output;added conversion htmlspecialchars|
|2004-12-13|| ||Pmwiki 2.0 beta|
|2004-05-16||1.14||Magpie 0.61 basic atom support|
|2004-01-12||1.4||Using new Keep function|
Added <ul> to meet xhtml validation
|2004-01-12||1.2||Added more ways to display the feed.|
- archived documentation
- git repository
See discussion at RssFeedDisplay-Talk.
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.