Rss feed (again :)

More
4 years 1 week 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
4 years 1 week 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
4 years 1 week 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
4 years 1 week 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
4 years 1 week 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
4 years 1 week 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.

More
4 years 1 week ago - 4 years 1 week ago #82096 by Chabi01
Replied by Chabi01 on topic Rss feed (again :)
Hi Micker,
Ok, I give you some more explanations to help you to understand.
In rss feed generated, you have for each item a enclosure "description".
This enclosure, if you add image or extra fields compile all the fields in the description field.
Then, if you have an image, the field will be added in the description enclosure and not a separate enclosure "image".
If you have to work with some application or external program which need this specific enclosure, you have to separate this field image from the description enclosure. That's what i did.

Xavier

Hope you can understand better.
Last edit: 4 years 1 week ago by Chabi01.

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

More
4 years 1 week ago - 4 years 1 week ago #82097 by micker
Replied by micker on topic Rss feed (again :)
ok i understand maybe we can add this idea in core
github.com/FLEXIcontent/flexicontent-cck...y/view.feed.php#L175
github.com/FLEXIcontent/flexicontent-cck...t/view.feed.php#L162
and remove custom field on description to add a xml tag ?
see it here
github.com/FLEXIcontent/flexicontent-cck/issues/1049

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]
Last edit: 4 years 1 week ago by micker.

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

More
4 years 1 week ago #82105 by Chabi01
Replied by Chabi01 on topic Rss feed (again :)
Hi Micker,
Yes, it could be a good idea : choose if a field have to be included in the "description" enclosure or be separated in a specific enclosure.
But as Flexicontent use the rssrenderer of Joomla, I dont know if it is possible without a full change of the way the rss is generated then.

If you work with some customers (like "les mairies"), they often use a solution for phone and they need this kind of thing : from the "news" of the site, generate a rss feed for the phone (or for the information panel in the city where you can see informations) and for this, they have to generate very common but specific informations in the xml.

Have a good evening Yannick :)
Xavier

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

More
4 years 1 week ago #82110 by micker
Replied by micker on topic Rss feed (again :)
please help me to add more detail in this issue

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
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
Save