Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [archived] tcm_rss - RSS feeds with any formatting
-the format is ISO 8601, I still can’t figure out how to process it.
Offline
#17 2004-12-04 22:10:40
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: [archived] tcm_rss - RSS feeds with any formatting
Use strptime and specify the format, something like "%Y-%m-%dT%H:%M", then use mktime or gmmktime.
I don’t think the ‘Z’ should be there, that should be the time zone. You might have to make several attempts using strptime with different formats – it’ll return false if the format doesn’t match.
Last edited by zem (2004-12-04 22:11:13)
Alex
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
thanks, but I think that strptime is only in the CVS version of PHP (it definitely isn’t defined on my system, and that’s what the php manual page says.)
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
Assuming the format is always the same, dump it to a variable then use some preg command(s) to strip it into a format you can use.
Or try this blighter I found on the php man pages:
function iso8601_date($time) {
$tzd = date(‘O’,$time);
$tzd = substr(chunk_split($tzd, 3, ‘:’),0,6);
$date = date(‘Y-m-d\TH:i:s’, $time) . $tzd;
return $date;
}
Last edited by longplay (2004-12-05 15:06:06)
Offline
#20 2004-12-14 04:33:39
- proph3t
- Member
- Registered: 2004-09-26
- Posts: 31
Re: [archived] tcm_rss - RSS feeds with any formatting
Can’t get it to work with my site, I did all the same stuff as Kossatsch did, but I used this .xml file:
http://www.casinoman.net/asp/rss/cmnews.xml
Is there something wrong with it?
edit: for a bit more info:
- Uploaded the lib folder and installed/activated plugin. <br />
- Inserted: < txp:tcm_rss feed=“http://www.casinoman.net/asp/rss/cmnews.xml” form=“default” limit=“3” / > into my page.<br />
- Refresh page and nothing shows at all.
Last edited by proph3t (2004-12-14 04:53:22)
Offline
#21 2004-12-14 04:55:51
- proph3t
- Member
- Registered: 2004-09-26
- Posts: 31
Re: [archived] tcm_rss - RSS feeds with any formatting
Fixed it!
Unfortunately the limit function isnt working…
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
Thanks to zem, the plugin is now downloadable.
Offline
#24 2004-12-22 22:15:49
- apo
- Member
- From: Germany
- Registered: 2004-10-27
- Posts: 53
Re: [archived] tcm_rss - RSS feeds with any formatting
anyone got an idea how to “sync” the charset a rss feed gives?
at our site we use utf-8 all over the site (given by htaccess, since there were problems with umlauts). but when including an rss that doesnt use utf-8, it gives umlaut-problems again…
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
Ok – not getting anything. The page has nothing but this code on it:
[code]< txp:tcm_rss feed=“http://confettifalling.com/?rss=1” form=“rss” / >[/code] – output has only the runtime, no other tags.
Plugin is enabled, and the files in the lib folder were uploaded to textpattern/lib.
Any ideas?
Last edited by Jennifer (2005-03-20 20:32:24)
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
my first guess is that the form for the rss feed to use isn’t specified / created? I can’t see the code you posted though, so I’m kinda shooting in the dark.
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
Ok, I got the code here to show up – and I did create the rss form, using the provided example.
Last edited by Jennifer (2005-03-20 20:33:05)
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
the limit function is not working for me— has there been a fix for this?
Offline
#29 2005-04-21 20:06:29
- yuzz
- New Member
- Registered: 2004-11-21
- Posts: 2
Re: [archived] tcm_rss - RSS feeds with any formatting
After enabling the plugin, I get the following errors at the beginning of the page:
============
Warning: MagpieRSS: Failed to fetch http://workingidea.com/?atom=1. (HTTP Response: HTTP/1.1 302 Found ) in /$PATH/projectoria/projectoria.org/textpattern/lib/rss_fetch.inc on line 230
Warning: Invalid argument supplied for foreach() in /$PATH/projectoria/projectoria.org/textpattern/publish.php(767) : eval()’d code on line 301
Warning: Bad arguments to join() in /$PATH/projectoria/projectoria.org/textpattern/publish.php(767) : eval()’d code on line 323
============
And this one right after the link to the section which has to output the feed links (i.e. the link on the page to the page itself):
============
Warning: Cannot add header information – headers already sent in
============
The feed is called via:
[code]
…txp:tcm_rss form=“rss” feed=“http://workingidea.com/?atom=1” limit=“4” /…
[/code]
Number of articles is not limited to 4
UPDATE: While writing this, I have noticed that the problem seemingly exists only for atom feeds and does not appear with RSS feeds. But still can’t work out the limits problem. When I open the plugin code for editing, under the Save button I see this:
Uh, the only current options are feed=“feedurl” and form=“anyform”
:(
UPDATE 2: It worked now and it’s really great, thanks! :-) I had missed the new version of the plugin provided a few posts above, cause I had it downloaded in a zip archive from tmacwrig’s page.
Last edited by yuzz (2005-04-21 21:38:41)
Offline
Re: [archived] tcm_rss - RSS feeds with any formatting
could you try a different feed? the feed url http://www.workingidea.com/?atom=1 seems to be invalid, maybe you should try something like http://workingidea.com/parallel/?atom=1§ion=writing
Offline