Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2004-12-04 16:40:09

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

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

#18 2004-12-05 01:37:16

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

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

#19 2004-12-05 15:00:45

longplay
New Member
Registered: 2004-07-18
Posts: 3
Website

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

#22 2004-12-14 21:21:33

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

Re: [archived] tcm_rss - RSS feeds with any formatting

Hey guys, the new version is ready to go, but it isn’t ouputting as a plugin. I can’t seem to figure out why the new plugin template isn’t working – the code doesn’t include <<<eod or anything.

The error is here, and the full source is here

any help would be greatly appreciated

Offline

#23 2004-12-21 23:59:57

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

Re: [archived] tcm_rss - RSS feeds with any formatting

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

#25 2005-03-20 20:04:00

Jennifer
Member
From: Michigan
Registered: 2004-02-25
Posts: 74
Website

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

#26 2005-03-20 20:31:28

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

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

#27 2005-03-20 20:32:52

Jennifer
Member
From: Michigan
Registered: 2004-02-25
Posts: 74
Website

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

#28 2005-04-15 16:54:24

asarbogast
Member
From: Arcata, CA
Registered: 2004-05-21
Posts: 33
Website

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

#30 2005-04-21 21:41:54

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

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&section=writing

Offline

Board footer

Powered by FluxBB