Rss feed (again :)

More
2 years 8 months ago #82087 by Chabi01
Rss feed (again :) was created by Chabi01
Hi everybody,

For my needs, I check several threads and did not found how to achieve what I need.
On the forum, I have found how to add information to the "description" like this one : www.flexicontent.org/component/kunena/30...-in-rss.html?start=0

but this is not exactly what I want.
So,
I have added an extra field "rssimage" to a type. This field contains only an image ;)

I need to add to the category feed the image field, for example :
Code:
<item>             <title>My article title</title>             <link>https://link_to_my_page.html</link>             <guid isPermaLink="true">https://link_to_my_page.html</guid>             <description><![CDATA[                     <div class="feed-description">                         the generated feed for the description ok</description>                  [b]<image>                             <url>​ http://www.mysite.fr/upload/images/actus/example.png​</url>                             <title>name of the image or name of the page</title>                             <link>https://www.mysite.fr/</link>                             <description><![CDATA[a little description of the image]]></description>          </image>[/b]                          <category>Informations</category>             <pubDate>Thu, 31 Mar 2022 11:56:18 +0200</pubDate> </item>

How to call the image field separatly like this and not in the "description" area then ?

Thanks for your help :)
Xavier

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #82088 by Chabi01
Replied by Chabi01 on topic Rss feed (again :)
While waiting for your help, I try to modify the view.feed.php file.

I have tried to add :
$imagerss ='<image><url>'.$_img.'</url></image>';
and then below :
$JF_item->imagerss = $imagerss;

But it is not working : i do not get the image field in the feed...

Xavier

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #82091 by micker
Replied by micker on topic Rss feed (again :)
sorry but you want to add image in rss description ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #82092 by Chabi01
Replied by Chabi01 on topic Rss feed (again :)
Hi Micker,
Not at all, check my question : i want to add in the flux for each item :

<image>
<url>​ www.mysite.fr/upload/images/actus/example.png​
<title>name of the image or name of the page</title>
<link> www.mysite.fr/
<description><![CDATA[a little description of the image]]></description>
</image>

Not to add the image in the description of the feed...

This is very important as we use apps for phone which need an image separately and not in the description...
Thanks,
Xavier

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #82093 by Chabi01
Replied by Chabi01 on topic Rss feed (again :)
Ok, I understood ! Let me explain.

In fact, "the /components/com_flexicontent/views/category/view.feed.php" file prepares the content for the parser of Joomla.

Then, to have the inclusion of this "new" xml enclosure in my rss feed, you have to modify the Joomla rss parser in "/libraries/src/Document/Renderer/Feed/RssRenderer.php".

The modification in my case was :
in view.feed.php :
Line 190 :
Code:
$imagerss = $thumb;                                        // Add readmore link to description if introtext is shown, show_readmore is true and fulltext exists             $more_text_exists = (!$feed_summary && $item->fulltext) || $item_desc_cut;

and in the renderer
added Line 243 after the <comments> xml enclosure and before the "date" condition :
Code:
                        if ($data->items[$i]->imagerss != '')             {                 $feed .= '<image><url>' . htmlspecialchars($data->items[$i]->imagerss, ENT_COMPAT, 'UTF-8') . "</url></image>\n";             }

Then, I can have the correct result as I have my <image>....</image> included in my feed.

For the record, I add to find this by myself by searching a tag in all the file of Joomla (I did not found any doc on this).

BE CAREFULL IF YOU PLAN TO DO THIS BY YOURSELF ! In this search for a solution, I had to modify 2 files without using any template override ! At the next update of Flexicontent or Joomla, there is a chance to lose these changes !

Then, if somebody have a solution to add these change to my template (as overrides), it could be very usefull to know, and I would be glad to have an explanation :)

Thanks,
Xavier
 

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #82095 by micker
Replied by micker on topic Rss feed (again :)
hello no sure to understand but you already have an option to add an image with image field in RSS, just check rss tab in your category option is inside
but maybe i don't understand realy your question

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.538 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline