Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 07:10 am EST
Geeklog Forums
Links in RSS Feeds
Status: offline
merlik
Forum User
Newbie
Registered: 05/30/05
Posts: 9
Location:Hawaii
Does anyone know how when I create a story that is html formatted with links, how I can get those links to show up in the RSS feed as well. I put a link into the actual story and it shows up as a link on the home page but when I view the story with something like bloglines the link just appears as text. Thanks for your help and I am sorry if this was already posted. I did a search but couldn't find it.
~Chewing on the fingers of life.~
~Chewing on the fingers of life.~
12
15
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
All that's required is a feed writer class that doesn't strip the HTML. Feel free to provide one ...
Geeklog 1.3.12 will have a new subsystem for feeds, but I don't know if it strips HTML or not.
bye, Dirk
Geeklog 1.3.12 will have a new subsystem for feeds, but I don't know if it strips HTML or not.
bye, Dirk
12
11
Quote
Status: offline
merlik
Forum User
Newbie
Registered: 05/30/05
Posts: 9
Location:Hawaii
How hard would it be to make a plugin for geeklog that creates it's own feed with basically the same options that are avaialble now but adding more functionality like maybe letting you choose whether it strips the links or not or to automatically add an enclosure to it if the link is to an mp3 for a podcasting solution.
~Chewing on the fingers of life.~
~Chewing on the fingers of life.~
10
17
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Technically, it's not a plugin but only a new feed writer class. Those are rather small and it shouldn't be hard to write one that does what you want.
In fact, I wrote an Atom feed writer class some time ago that did export stories in whatever mode they were posted (HTML or plain text). But that was against an older (now obsolete) Atom specification.
bye, Dirk
In fact, I wrote an Atom feed writer class some time ago that did export stories in whatever mode they were posted (HTML or plain text). But that was against an older (now obsolete) Atom specification.
bye, Dirk
12
12
Quote
Status: offline
merlik
Forum User
Newbie
Registered: 05/30/05
Posts: 9
Location:Hawaii
Ok, I will just have to see about taking this into my own hands. Is there a good resource anywhere to learn how to write plugins for geeklog and such? This would be completely new to me but I can be a quick learner at times lol, and I would love to help out the geeklog community because it is my favorite CMS. I messed with Mambo, Drupal and one other I can't remember before deciding on geeklog.
~Chewing on the fingers of life.~
~Chewing on the fingers of life.~
10
32
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Again, this is not a plugin - only a feed writer class.
Have a look at the existing classes (including the ones you already downloaded) and at system/lib-syndication.php, which is the code that calls these classes.
As I said, I'm not sure if RSS supports HTML in feeds at all (or when it does, which version of RSS would support it), so you'd have to do some research on this. I know that Atom allows this, so you could start over at www.atomenabled.org if you want to go the Atom route.
Happy hacking.
bye, Dirk
Have a look at the existing classes (including the ones you already downloaded) and at system/lib-syndication.php, which is the code that calls these classes.
As I said, I'm not sure if RSS supports HTML in feeds at all (or when it does, which version of RSS would support it), so you'd have to do some research on this. I know that Atom allows this, so you could start over at www.atomenabled.org if you want to go the Atom route.
Happy hacking.
bye, Dirk
13
9
Quote
Status: offline
merlik
Forum User
Newbie
Registered: 05/30/05
Posts: 9
Location:Hawaii
w00t! It was actually easier than I thought. All I really did was edit 1 line in the atom.feed.class.php.
I had to change
to
I have heard that that leaves some kind of security vulnerability but I am not sure how, sorry for my lack of PHP knowledge.
~Chewing on the fingers of life.~
I had to change
Text Formatted Code
$storytext = trim (strip_tags ($text));to
Text Formatted Code
$storytext = trim ($text);I have heard that that leaves some kind of security vulnerability but I am not sure how, sorry for my lack of PHP knowledge.
~Chewing on the fingers of life.~
8
10
Quote
Status: offline
THEMike
Forum User
Moderator
Registered: 07/25/03
Posts: 141
Location:Sheffield, UK
You should be safe with that, as geeklog has fully filtered the content that comes IN to the system to make sure the HTML in your stories is fine. However, people aggregating any feed with HTML need to be careful to ensure any HTML in the inbound feed isn't full of exploitative HTML.
I think that the 1.3.12 stuff also does a full strip of the html. RSS 2.0 supports an "encoded" directive to allow HTML. But I think I stuck with stripping the HTML. Perhaps it shouldn't strip links, and perhaps it should turn img's into links. (I hate when feeds I watch put images in...)
I think that the 1.3.12 stuff also does a full strip of the html. RSS 2.0 supports an "encoded" directive to allow HTML. But I think I stuck with stripping the HTML. Perhaps it shouldn't strip links, and perhaps it should turn img's into links. (I hate when feeds I watch put images in...)
13
9
Quote
Status: offline
merlik
Forum User
Newbie
Registered: 05/30/05
Posts: 9
Location:Hawaii
Ok, thanks much for the info. I use bloglines to aggregate my feeds so I never really worry to much about it, but if it changes again in 1.3.12, I can always edit it again seeing as it wasn't that hard. I am also going to try to learn more about the new Atom 1.0 when it comes out and see about making a class for it.
~Chewing on the fingers of life.~
~Chewing on the fingers of life.~
8
15
Quote
All times are EST. The time is now 07:10 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content