Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[archived] tcm_rss - RSS feeds with any formatting
Notice: This thread is archived, this plugin is no longer available.
**********************************************************
Well, for now it’s just a little scratchy. I’d like to see a few more RSS and Atom feeds to get a feel for what’s out there, so if you guys try this and it doesn’t have the desired output, post it.
This plugin will display RSS feeds or Atom feeds with unbeatable style. This is because it uses Textpattern’s article forms – the default is “rss”. I have mine set up as
<h3><txp:permlink><txp:title /></txp:permlink></h3>
<txp:excerpt />
<hr />
Currently the following tags will work on some feeds.
- body
- title
- posted (format will vary)
- author
Because it works in the exact same way as txp:article, it should work with plugins just the same (for instance, safe excerpt plugins).
It takes the options “feed” (the feed url) and “form” (the form).
It uses MagpieRSS.
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
this looks really cool. could you please provide a code example of using the plugin in textpattern. thanks
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
yes, please. I downloaded this but have no idea how to incorporate it.
Aaron Brazell
United States Navy
chmod a+x /bin/laden – Give everyone permission to execute /bin/laden
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
(Hopefully I can follow up on this topic a little later)
Offline
#5 2004-08-23 21:29:58
- nednieuws
- Member
- From: The Home of Heineken
- Registered: 2004-08-21
- Posts: 14
Re: [archived] tcm_rss - RSS feeds with any formatting
On page default, I have:
<code><txp:tcm_rss
feed=“http://rss.topix.net/rss/arts/dance.xml”
form=“rss”
/></code>
Form rss (of type article) is defined as:
<code><h3><txp:title /></h3>
<p><txp:excerpt /></p></code>
<del>It doesn’t seem to generate any output, so what did I miss?</del>
I enabled the plug-in above the rss plugin, ie. the rss plugin was disabled :/
Last edited by nednieuws (2004-08-24 00:31:10)
Regards, Charles.
Offline
#6 2004-08-23 21:56:49
- nednieuws
- Member
- From: The Home of Heineken
- Registered: 2004-08-21
- Posts: 14
Re: [archived] tcm_rss - RSS feeds with any formatting
Oh, and it would be nice if tcm_rss would support “limit”, eg. limit=“3” would only display/fetch the latest 3.
Regards, Charles.
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
Took me a while to figure out how to get it working, but it’s working great now.
Thanks, just the plug-in I was looking for.
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
I modified the plugin a bit to enable cacheing of requests. Some sites like slashdot.org get cranky if their rss file is hit more than once every 30 minutes (1800 seconds).
To enable cacheing place the following at the top of the tcm_rss plugin:
function tcm_rss($atts) {
//joewilswashere
$MAGPIE_CACHE_ON = ‘1’;
$MAGPIE_CACHE_DIR = ‘/path/to/cache’;
$MAGPIE_CACHE_AGE = ‘1800’;
$MAGPIE_CACHE_FRESH_ONLY = ‘0’;
Notes from Magpie documentation on what each directive does:
MAGPIE_CACHE_ON – Should Magpie cache parsed RSS objects?
MAGPIE_CACHE_DIR – Where should Magpie cache parsed RSS objects?
This should be a location that the webserver can write to. If this directory does not already exist Mapie will try to be smart and create it. This will often fail for permissions reasons.
MAGPIE_CACHE_AGE – How long to store cached RSS objects? In seconds.
MAGPIE_CACHE_FRESH_ONLY – If remote fetch fails, throw error instead of returning stale object?
Last edited by joewils (2004-10-12 00:10:23)
From here to there and there to here funny things are everywhere.
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
“Any way I can do multiple feeds?”
I’m able to post multiple feeds by calling the plugin twice within the same post.
Example of article with more than one feed:
txp:tcm_rss feed=“http://www.democrats.org/syndication/headlines.rss.xml” form=“rss”
txp:tcm_rss feed=“http://jon.plainculture.com/feed/rss” form=“rss”
Last edited by joewils (2004-10-19 17:22:44)
From here to there and there to here funny things are everywhere.
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
I don’t get it started.
I did the following:
- Downloaded the plug-in
- Put it on the server (the lib-directory into textpattern/lib – is this correct?)
- Installed and activated the plug-in
- Defined an article form called rss with title and body.
- Inserted
<txp:tcm_rss feed="http://del.icio.us/rss/Kossatsch" form="rss" />
into the page template.
Any idea what could be missing?
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
Okay, part of your problem is that the feed that you’re trying to read doesn’t have “body”, and the other problem it’s Atom (which the version of Magpie I included only has preliminary support for).
I’m going to look around for some agregators or a simpler techinque of doing this.
Offline