Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

PmFeed

Summary: RSS feed display for PmWiki.
Version: 0.08
Prerequisites: pmwiki-2.1
Status: Stable
Maintainer: ccox
Categories: RSS

Description

This recipe uses lastRSS (embedded into PmFeed for you) to display RSS feeds using PmWiki markup.

Download: pmfeed.phpΔ

You can see an example here: http://theendlessnow.com/ten/PmFeed/PmFeed

Another test here: http://ntlug.org/wiki/Main/News

Notes

Place pmfeed.php (this file)Δ into your cookbook directory (e.g. /srv/www/htdocs/pmwiki/cookbook)

Include the cookbook in your local/config.php

 include_once('cookbook/pmfeed.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.

(:pmfeed feed='http://www.digg.com/rss/index.xml':)

or with some variables

(:pmfeed feed='http://www.digg.com/rss/index.xml' showitemdescr='false' max_count=10:)

Variables:

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).

Release Notes

0.01: Initial release.
0.02: Attempt to interpret some HTML tags as PmWiki equivalents. Enabled for now.
0.03: Renamed banner to title and added several "show" options and added an unsafe option for some flexibility/risk.
0.04: Fixed bug regarding use of newwin=false resulting in bad output (space problem).
0.05: Attempt to handle some character issues (utf8 and other hacks).
0.06: Major updates. Added more options (see below). Much better i18n

support especially when pmwiki is running in utf8 mode.

0.07: Fixes bug with itemspace handler canceling out max_count.
0.08: Added showpubdate option.

Comments

Problem with Title

I am having a problem with the Title Option. The Followinlg line output the following Title Dirson"google.dirson.com" (:pmfeed feed='http://google.dirson.com/rss.php' showitemdescr='false' title='Dirson' max_count=10:)

and this one the following \"Dirson\""google.dirson.com" (:pmfeed feed='http://google.dirson.com/rss.php' showitemdescr='false' title="Dirson" max_count=10:)

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.


See Also

Contributors

Ccox

Edit - History - Print - Recent Changes - Search
Page last modified on June 24, 2008, at 10:31 PM