Publishing RSS feeds from Joomla doesn't include the fields intro image or full image
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.
If i use those fields to have images in my content they don't appear in rss feed.
Every Joomla 2.5.x and 3.x
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
Title |
|
Title |
|
Title |
|
Closing this as I have converted this issue into a Pull request for testing #11402
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-08-02 19:32:48 |
Closed_By | ⇒ | brianteeman |
Let me add the link to the file:
https://github.com/joomla/joomla-cms/blob/staging/components/com_content/views/category/view.feed.php#L40
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8198.