Joomla produced RSS feeds and links

General questions relating to Joomla! There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
jeremiah
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri Sep 02, 2005 2:56 am

Joomla produced RSS feeds and links

Post by jeremiah » Mon Oct 03, 2005 9:19 am

Why do Joomla rss feeds lose links within the content.  Well, not actually lose them but expand them out and make thim non-links?  For example - here is an article from the Joomla news feed the way it is translated within the Joomla news feeds section.
Joomla! 1.0.2 [Sunset] is now available on the forge for download here {http://developer.joomla.org/sf/frs/do/v ... _1_0.1_0_2). This is a Stability Release, which means it does not have any new features, it only contains fixes, to bugs discovered in the 1.0.1 release. 1.0.2 is available as a Full Package (http://developer.joomla.org/sf/frs/do/d ... s1603?dl=1), which contains all Joomla! files and a Patch Package (http://developer.joomla.org/sf/frs/do/d ... s1607?dl=1) which contains only the files that have been changed by the Stability work conducted. 1.0.2 Changelog (http://www.joomla.org/content/view/273/66/) 1.0.2 Version Information (http://www.joomla.org/content/blogcategory/32/66/)
I would rather it show up like this, with the links intact as all the other feeds I am using do. 
Joomla! 1.0.2 [Sunset] is now available on the forge for download here. This is a Stability Release, which means it does not have any new features, it only contains fixes, to bugs discovered in the 1.0.1 release. 1.0.2 is available as a Full Package), which contains all Joomla! files and a Patch Package which contains only the files that have been changed by the Stability work conducted. 1.0.2 Changelog 1.0.2 Version Information
Is there a option I can set to make it do that?  People are less likely to follow the url from the feed this way.  Thanks Guys!
Last edited by jeremiah on Wed Mar 08, 2006 5:34 pm, edited 1 time in total.

User avatar
stingrey
Joomla! Hero
Joomla! Hero
Posts: 2756
Joined: Mon Aug 15, 2005 4:36 pm
Location: Marikina, Metro Manila, Philippines
Contact:

Re: Joomla produced RSS feeds and links

Post by stingrey » Mon Oct 03, 2005 4:00 pm

This is due to the way that feeds are being created.
All html is first removed before the feed is created as it may cause problems when you create a feed with html elements


Two ways you could approach this - both require hacking core.


1. Change the way feeds are created and allow html elements - pre-processing
/components/com_rss/rss.php
Line 192

2. Or add code in the newsfeed component that accepts the syndicated code and converts links to be clickable.
/components/com_newsfeeds


First option is easier to do, but option 2 is more sound but requires a little more work
Rey Gigataras
http://www.wizmediateam.com <-- great team of talented Web Designers and Programmers!
http://about.me/reygigataras <-- About Me :)
Partner, Business Development & Project Manager, Event Manager, Sports Coach :D

User avatar
stingrey
Joomla! Hero
Joomla! Hero
Posts: 2756
Joined: Mon Aug 15, 2005 4:36 pm
Location: Marikina, Metro Manila, Philippines
Contact:

Re: Joomla produced RSS feeds and links

Post by stingrey » Mon Oct 03, 2005 4:05 pm

BTW i only noticed this myself recently and it is something on my todo.

Hopefully I can come up with a workable solution
Rey Gigataras
http://www.wizmediateam.com <-- great team of talented Web Designers and Programmers!
http://about.me/reygigataras <-- About Me :)
Partner, Business Development & Project Manager, Event Manager, Sports Coach :D

jeremiah
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri Sep 02, 2005 2:56 am

Re: Joomla produced RSS feeds and links

Post by jeremiah » Mon Oct 03, 2005 4:32 pm

WooHoo!  As always thank you stingrey!!!

I'll dig through the code (thanks for giving me the exact direction!!) and see what I can come up with too.  I'll update with my findings :)

googirama
Joomla! Explorer
Joomla! Explorer
Posts: 323
Joined: Fri Jan 06, 2006 1:34 am
Contact:

Re: Joomla produced RSS feeds and links

Post by googirama » Wed Feb 22, 2006 5:49 pm

Yes,
I had the same issue with Feeburner - I'll wait for a fix. It's not a huge thing.
thanks!
www.googirama.com: Mobile Blogging Tools Technology Commentary

jeremiah
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri Sep 02, 2005 2:56 am

Re: Joomla produced RSS feeds and links

Post by jeremiah » Wed Mar 08, 2006 5:51 pm

Meant to post this before now (stinking busy life).

Following stingrey's directions above you can get your URL's to start working.

In /components/com_rss/rss.php
Line 233  (This is the line number in Joomla_1.0.8-Stable).

  Replace

Code: Select all

		// $item_description = mosHTML::cleanText( $item_description );
  with

Code: Select all

		// Removed to allow URLS to be included as active links in feeds.
		// $item_description = mosHTML::cleanText( $item_description );
My links are now being rendered as links within the feeds so I am happy there. 

** The only glitch I see to this method now is that any {mosimage} references are not translated into links to image files.  They actually show up as '{mosimage}' in the feeds.  Not a big deal for now since you can post images in normal html style if you want them to show up there anyway.  For me the links were a bit more important and the stats from FeedBurner are showing a good bit of clickthrough.

this post may need to be moved to core hacking now?
Last edited by jeremiah on Wed Mar 08, 2006 5:55 pm, edited 1 time in total.

User avatar
Martjan
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 196
Joined: Fri Feb 17, 2006 8:50 am
Location: Amersfoort The Netherlands
Contact:

Re: Joomla produced RSS feeds and links

Post by Martjan » Wed Mar 08, 2006 7:10 pm

After trying your hack, I get the following error using Awasu rss reader:

08mar06 19:24:00 Nieuwsfeed van de Adventkerk error: Can't update the feed.
                - XML parse failed (4:L19/C640): not well-formed (invalid token)

On this position there seems to be a space character, and on another place that gives an error there is a "é" character.

jeremiah
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri Sep 02, 2005 2:56 am

Re: Joomla produced RSS feeds and links

Post by jeremiah » Wed Mar 08, 2006 7:21 pm

I just installed Awasu (thanks for the tip - it is nice) to test and all seems fine on my feeds?.  I have tested the feedburner output of 2 sites feeds post hack with greatnews, yahoo news and such.

Are you using a wysiwyg editor?  one thing the code that you just commented out does is help save you from yourself in the case of those adding junk to your news items.

Try this -> http://feeds.feedburner.com/TheAmps11NewsFeed
Last edited by jeremiah on Wed Mar 08, 2006 7:31 pm, edited 1 time in total.

User avatar
Martjan
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 196
Joined: Fri Feb 17, 2006 8:50 am
Location: Amersfoort The Netherlands
Contact:

Re: Joomla produced RSS feeds and links

Post by Martjan » Wed Mar 08, 2006 9:10 pm

The feed doesn't give any trouble with FeedDemon, so I guess it is a problem with content in combination with Awasu.

I just put back the original rss.php because I don't want to run into compatibility issues, but getting the links in is really a nice feature.

googirama
Joomla! Explorer
Joomla! Explorer
Posts: 323
Joined: Fri Jan 06, 2006 1:34 am
Contact:

Re: Joomla produced RSS feeds and links

Post by googirama » Thu Mar 09, 2006 8:07 pm

If you do publish this as a hack please specify that it seems to break the {mosimage} tags! Since this is the prefered method of inserting images in Joomla people should know this - and yes, it does seem to work fine on my Feedburner feeds also....have tested with MyYahoo, Sage (Firefox Rss reader) and Windows Sharp Reader.
www.googirama.com: Mobile Blogging Tools Technology Commentary


Locked

Return to “General Questions - 1.0.x”