This recipe uses lastRSS (embedded into PmFeed for you) to display RSS feeds using PmWiki markup.
You can see an example here: http://theendlessnow.com/ten/PmFeed/PmFeed
Another test here: http://ntlug.org/wiki/Main/News
Include the cookbook in your local/config.php
Create a cache directory at pub/cache under your your PmWiki base directory. Needs to be writable by the web username.
On a page include the markup with a feed url.
or with some variables
feed= URL to RSS feed file. Defaults to pmwiki.org's Site/AllRecentChanges. cache_time= Time to cache data... be nice to the providers. Defaults to 2000 seconds. Set to 0 to disable. encoding= Override the feed's encoding with this value. imagestyle= A wikistyle to apply to images (see showimages). itemspace= Defaults to 1, means 1 blank line after item. max_count= Number of items to read. Defaults to 0. newwin= Open links to items in a new window. Defaults to true. overrides= Set this to false to prevent URL line GET overrides to these parameters. showfeedxmllink= Defaults to false. Add link by the title to the original RSS feed file. showimages= Defaults to false. Attempt to show images in feed. showitems= Defaults to true. If false, don't show RSS items. showitemdescr= Defaults to true. If false, don't include the description along with the item. showpubdate= Defaults to false. Attempt to show publish date for item. showtables= Defaults to false. Attempt to show tables in feed. showtitle= Defaults to true. If false, don't show the feed title. title= Alternate title instead of using RSS title. unsafe= Defaults to false. If true, allows setting of title and feed from the URL line (_GET).
Title still broken? And HTML in content?
Is this recipe being maintained? The title problem reported below is still happening... e.g. this code:
Also, is there any simple solution to enabling HTML links in the description of an item to be functional? Again, in the above link there are tags that should be links but are just showing as plain text.
tia -- Chris Lott 1/28/09
Problem with Title
I am having a problem with the Title Option. The Followinlg line output the following Title Dirson"google.dirson.com"
and this one the following \"Dirson\""google.dirson.com"
should I write it differently or is it a bug ?
-Edwin Marte, Nov 20 2007
It's a bug. I was attempting to use Alt-Text on a link, but in PmWiki, you can only have Alt-Text on image links. so... right now you'd have to create an image title. I'll try to get a fix out in the next couple of days.
Problem with feedburner?
Can it be used with feedburner? Like this: (:pmfeed feed='http://feeds.feedburner.com/undergoogle' :)
I'm not having any success with this and can't figure it out why.
Undergoogle's supposed rss feed isn't rss or atom... it's junk. Just happens to display well on it's own. Maybe something can make heads or tails of it... it's pretty much just a bunch of CSS and HTML.
Probable causes of "Error: It's not possible to reach RSS file "
Unfortunately, it can mean many things. It could be that the format is of the supposed rss is not really rss, but some atom variant. Or it could be that your php and machine do not have any way for php or callouts to wget/curl/lynx to pull the rss url.
Problems with timeout
When the feed fails (e.g. Twitter status displayed on every page) it uses up all the php-cgi possibles locking out the wiki. A way to solve this is to add the timeout as a parameter:
SDVA($PmFeedAltGet, array( '/usr/bin/curl --connect-timeout 5 -k %s', '/usr/bin/wget -T5 -O - %s', '/usr/bin/lynx -connect_timeout=5 -source %s'));
Utopiah February 26, 2011, at 08:02 AM