Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-04-25 20:44:14
- Reginleif
- New Member
- Registered: 2004-10-27
- Posts: 7
Editing the RSS/Atom output?
I’d like to add an author byline and a list of categories for each article to my RSS feed, but don’t know what to edit where. Any pointers would be appreciated. I’ve run numerous searches here and at two other Textpattern sites, but haven’t come up with any hints.
Thanks!
Offline
Re: Editing the RSS/Atom output?
Anybody have any suggestins for this? It’s really difficult to have a multi-author blog without being able to put the author’s name in the RSS feed.
Offline
#3 2006-04-30 23:14:50
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Editing the RSS/Atom output?
Textpattern uses RSS 0.92, which doesn’t allow an ‘author’ field.
Alex
Offline
Re: Editing the RSS/Atom output?
Then it should be added to the body, not as a separate field.
I got this far:
$author_name = get_author_name($thisarticle[‘authorid’]); $posted_by = ‘Posted By: ‘.$author_name;However, whenever I try to prepend it to the body anywhere here:
$Body = (!$syndicate_body_or_excerpt) ? $thisarticle[‘body’] : $thisarticle[‘excerpt’]; $Body = (!trim($Body)) ? $thisarticle[‘body’] : $Body; $Body = str_replace(‘href=”/’,‘href=”’.hu,$Body); $Body = preg_replace(“/href=\\\”#(.*)\”/”,“href=\”“.permlinkurl($a).”#\\1\”“,$Body); $Body = rss_safe_hed($Body);
$Body = preg_replace(array(‘/</’,’/>/’,”/’/”,’/”/’), array(‘<’,’>’,’‘’,’"’),$Body); // encode bare ampersands $Body = preg_replace(“/&(?!1+;|\w+;)/i”,’&’, $Body);
I get no feeds updating, because it never finishes, but I never know why it doesn’t finish because I can’t look at the actual error it might be giving me… all I know is that it doesn’t update. All I want to do is concatenate the posted_by variable to the Body variable,and it doesn’t work.
Offline
#5 2006-04-30 23:43:30
- Reginleif
- New Member
- Registered: 2004-10-27
- Posts: 7
Re: Editing the RSS/Atom output?
Don’t need it in the XML, just need to be able to do what Astarte is trying.
If RSS 0.92 doesn’t have it, then why isn’t TXP using a newer version of RSS? Does Atom allow it?
The sheer inflexibility of TXP’s RSS output is really crippling.
Offline
#6 2006-04-30 23:51:27
- KurtRaschke
- Plugin Author
- Registered: 2004-05-16
- Posts: 275
Re: Editing the RSS/Atom output?
People have been going around and around on the issue of TXP’s RSS feeds for months now. If you want improved RSS feeds, write and submit test cases, as has been requested many times before. TXP uses RSS 0.92 because it’s the last version which has a single clear specification which can be implemented with a minimum of fuss.
Better yet, just use Atom, which already does all of this.
http://forum.textpattern.com/viewtopic.php?id=11538
http://forum.textpattern.com/viewtopic.php?id=12731
http://thresholdstate.com/threshold/4166/conventional-rss
-Kurt
Last edited by KurtRaschke (2006-04-30 23:52:11)
kurt@kurtraschke.com
Offline
#7 2006-05-01 01:27:42
- Reginleif
- New Member
- Registered: 2004-10-27
- Posts: 7
Re: Editing the RSS/Atom output?
Great. Seeing as how I’m completely new to textpattern, I wouldn’t know, nor do I care, that people have been going around about it for MONTHS now. You’d think if people have been going on about it for so long, that something would have been done by now. This is what turned me off of using Textpattern way back when it was in 1.0rc status… the community. People on their high horses, unbelieving that not everyone who asks a question is a lazy sod who hasn’t done a thorough forum and Google search.
Thanks for the Atom suggestion, but that lacks as well since textpattern doesn’t include the blog’s tagline or category list in each post. Since I’m unwilling and unable to hack into textpatterns UNCOMMENTED code in order to make it spit out an RSS2.0 specification, I’ll just use a different piece of software. Wordpress’s community tends to be similar (actually, I was originally chased off by the WP community for exactly the reason I’m feeling chased off by the TXP community now), but at least it’s a fairly complete piece of software with more options and I can get a decent RSS2.0 feed.
Offline
Re: Editing the RSS/Atom output?
Reginleif wrote:
Since I’m unwilling and unable to hack into textpatterns UNCOMMENTED code in order to make it spit out an RSS2.0 specification, I’ll just use a different piece of software. Wordpress’s community tends to be similar (actually, I was originally chased off by the WP community for exactly the reason I’m feeling chased off by the TXP community now), but at least it’s a fairly complete piece of software with more options and I can get a decent RSS2.0 feed.
If the Author’s name in a feed is important to you, then by all means use Wordpress, or anyone of the many other blogging tools available.
But don’t do it because of a forum post, cause you’ll be switching quite often ;)
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#9 2006-05-01 03:49:46
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Editing the RSS/Atom output?
Now that’s what turns me off, and I’m more than sick of that attitude.
Want to use something else that better suits your needs? Fine, your choice, good luck and happy blogging or whatever you’re doing, no one begrudges you that.
You asked why RSS 2.0 wasn’t supported and you were told why and what you could do about it if you really cared. Your response is launching an offensive against the answer, acting like you’re being chastised, then launched into a really tired whine-fest. High horses? Puh-lease. Look in the mirror.
If you want that magic software that will read your mind and make itself work, then go pay someone to make it and stop bothering everyone else.
Offline
#10 2006-05-01 03:55:20
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Editing the RSS/Atom output?
R,
The reason RSS 2.0 is still not support is that a clear, unambiguous and complete RSS 2.0 spec does not exist. The current one is sloppy and leaves many questions unanswered. Nobody – not the spec authors, the RSS board, the validator developers, or other CMS and weblog developers (WP included), knows the answers. (Everyone has an opinion, but all are slighly different, often conflicting, and none are definitive).
I’ve been working with Matt from WordPress and Mark from MODx to try and agree on some standard solutions to these problems – see Conventional RSS for details. I’m confident we’ll reach a consensus, and Textpattern will roll out a solution after that.
It’ll take time to finish. I don’t get paid to do this, so I have to fit it in between paying jobs, when I can afford to turn them down. If you’d like it to happen faster, you can hire me – my rates are listed here – or one of the many other fine Textpattern developers you’ll find on the forum.
Alex
Offline
#11 2006-05-01 04:18:05
- Reginleif
- New Member
- Registered: 2004-10-27
- Posts: 7
Re: Editing the RSS/Atom output?
Mary wrote:
Now that’s what turns me off, and I’m more than sick of that attitude.
Want to use something else that better suits your needs? Fine, your choice, good luck and happy blogging or whatever you’re doing, no one begrudges you that.
You asked why RSS 2.0 wasn’t supported and you were told why and what you could do about it if you really cared. Your response is launching an offensive against the answer, acting like you’re being chastised, then launched into a really tired whine-fest. High horses? Puh-lease. Look in the mirror.
If you want that magic software that will read your mind and make itself work, then go pay someone to make it and stop bothering everyone else.
——-
Actually, I didn’t ask why RSS 2.0 wasn’t supported, Mary, but that’s kind of beside the point right now. The answer given was fine for the most part. It was the attitude, now coming from you as well, that I could have done without.
Zem, thank you for your kind and informative post and the interesting link. If someone would have just said that in the beginning, and then maybe offered a few pointers for helping me to edit the rss.php file, a bunch of this unpleasantry could have been avoided. Thank you for all the work you’ve put into this project.
Offline
Re: Editing the RSS/Atom output?
All I wanted to do was put it in the body of the existing feed. I didn’t want new specifications or even a new type of RSS … just to be able to put a little more information in the existing body / excerpt.
But, never mind.
Offline