RSS import 3.0.1-pl

RSS import 3.0.1-pl

Released Feb 04, 2013 by ifman-modx

Snippet imports and shows RSS and Atom's feeds. Using only system libriares. Finding and converting character sets, formating date. Has templates support and default template. Has cache support. Can grab more than one fedd and merge feeds, sorted by date.

Page of snippet

Download 10kb (900 downloads)
Downloads: 2,775
License: GPLv2
Requires Evolution 1.0.x or greater
Supports

Using snippet

Simpe use:[[RSS? &url=`http://rss-url`]]

This prints last 10 items from rss-url using default template.

Fullest use:[[RSS?
&url=`http://rss-url,,http://another-rss-url` &num=`5` &tpl=`rss-output`
&more=`learn more...` &dateFormat=`%d.%m.%Y` &cacheAge=`60`
]]

Prints last 5 items from rss-url using chunk named 'rss-output'
as template and string 'learn more...' as more-link. Have date
formatting and caching output for 1 minute.

Supported params

url
- required. Contents http url of feed or double-comma separated urls. Like: "url1,,url2".

tpl - name of template chunk

more -
"more"-link text

num - number of outputing items

dateFormat - format of
outputing date for php function strftime

cacheAge - age of cache in seconds. If empty - no caching.

Template placeholders

[+date+]
- formatted date of item

[+title+] - title of item

[+text+] - contents of
item without CDATA

[+link+] - link of item (to original)

[+more+] - text
of link "more" or some else text

[+fedd_title+] - title of feed

[+feed_link+] - link of feed (not rss channel, but contents of tag in head of feed)

[+feed_description+] - guess...

Installation Instructions

Simply create a new snippet, called 'RSS' or something.

- possibility of attaching images is added. Thanks forThomas Jakobi.

- external rss.class.php (so the snippet could be called several times on one page)- template in a file- chunkie class for template parsing - PHx modifier are possible with that- rewritten documentation - markdown syntax.

Added some new placeholders like [+feed_title+].

Added support of multiple urls. Now gets some urls and merge them with sorting by date. Also added escaping of MODx special chars.

Functions are incapsulated in class to avoid names conflict.

Added cache support.

Version Released Author Downloads
7 Versions 1 Contributors 2,784 Downloads
3.0.0-pl Dec, 07 2012 ifman-modx 250
2.0.2-pl May, 04 2011 ifman-modx 612
2.0.0-pl May, 03 2011 ifman-modx 231
1.5.0-pl Apr, 13 2011 ifman-modx 292
1.0.0-pl Apr, 05 2011 ifman-modx 270
0.1.0-alpha Apr, 04 2011 ifman-modx 231