?
avatar nunoleite
nunoleite
29 Oct 2015

Steps to reproduce the issue

Publishing RSS feeds from Joomla doesn't include the fields intro image or full image

Expected result

For example when publishing a feed from a category or anything else from joomla it doesn't use the fields intro image and full image.

Actual result

If i use those fields to have images in my content they don't appear in rss feed.

System information (as much as possible)

Every Joomla 2.5.x and 3.x

Additional comments

Hi!

I miss something that i think it's important. And i don't know why anyone has never added this to Joomla.

Something that is missing is the ability to have the Intro or Full Images in the RSS generated by joomla.

So i have to hack this file in every of my sites:
File altered: components/com_content/views/category/view.feed.php

With this code:
Code:

// comment this line
//$item->description = $params->get('feed_summary', 0) ? $item->introtext . $item->fulltext : $item->introtext;
// and add the next lines
$item->description = '';
$obj = json_decode($item->images);
$introImage = ( isset( $obj->{'image_intro'} ) ) ? $obj->{'image_intro'} : '' ;
if (isset($introImage) && ($introImage != "")) {
  $image = preg_match('/http/', $introImage)? $introImage : JURI::root().$introImage;
  $item->description = '<p><img src="'.$image.'" /></p>';
}
$item->description .= ($params->get('feed_summary', 0) ? $item->introtext.$item->fulltext : $item->introtext);         
// end

Like this the intro image is added to the RSS that joomla shares.

After Joomla 2.5 with the addition of the IntroImage and FullImage fields joomla doesn't use them for the RSS feed and i think that should be important.

So, can anyone add this code to the development of joomla?

I don't know if this code is well written, so that's why i'm no making this myself.

Additionally with this it could be created an option in the News feed manager for the user to choose the intro or full image to show in the RSS feeds. With this, the code above had to be rewritten to implement that option.

I know there is an option in the Feed manager to choose to Show Image or not, but that doesn't work if we use the Intro and full images. Only works if the image is included in the article content.

Is there any other way?

Thanks
Nuno Leite

Votes

# of Users Experiencing Issue
2/2
Average Importance Score
4.50

avatar nunoleite nunoleite - open - 29 Oct 2015
avatar nunoleite nunoleite - change - 29 Oct 2015
The description was changed
avatar nunoleite nunoleite - change - 29 Oct 2015
Title
RSS with images (include intro image and full image fields)
RSS with images (include intro image and full image fields)
avatar nunoleite nunoleite - change - 29 Oct 2015
The description was changed
avatar nunoleite nunoleite - change - 29 Oct 2015
The description was changed
avatar nunoleite nunoleite - change - 29 Oct 2015
The description was changed
avatar nunoleite nunoleite - change - 29 Oct 2015
The description was changed
avatar nunoleite nunoleite - change - 29 Oct 2015
The description was changed
avatar nunoleite nunoleite - change - 29 Oct 2015
The description was changed
avatar nunoleite nunoleite - change - 29 Oct 2015
The description was changed
avatar nunoleite nunoleite - change - 29 Oct 2015
The description was changed
avatar nunoleite nunoleite - change - 29 Oct 2015
The description was changed
avatar nunoleite nunoleite - change - 29 Oct 2015
The description was changed
avatar nunoleite nunoleite - change - 29 Oct 2015
The description was changed
avatar nunoleite nunoleite - change - 29 Oct 2015
The description was changed
avatar nunoleite nunoleite - change - 27 Nov 2015
Title
RSS with images (include intro image and full image fields)
RSS feeds with images (include intro image and full image fields)
avatar nunoleite nunoleite - change - 27 Nov 2015
Title
RSS with images (include intro image and full image fields)
RSS feeds with images (include intro image and full image fields)
avatar brianteeman
brianteeman - comment - 2 Aug 2016

Closing this as I have converted this issue into a Pull request for testing #11402


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8198.

avatar brianteeman brianteeman - change - 2 Aug 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-08-02 19:32:48
Closed_By brianteeman
avatar brianteeman brianteeman - close - 2 Aug 2016

Add a Comment

Login with GitHub to post a comment