You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-12-16 17:46:06

Slingky
Member
Registered: 2023-12-15
Posts: 6

Customize RSS Feeds : show images without mouse hover

Hi guys,

I would like to know if it's possible to display RSS feeds without having to hover to display images ?

I would love to see it displayed like google discover ;

Screenshot-of-Google-Discover-App-and-Mobile-Site-Full-width.png

I didn't find any plugin. Maybe there is a quick fix I could do to the source code ?


Thanks a lot,
Maxime

Offline

#2 2023-12-18 15:22:17

Slingky
Member
Registered: 2023-12-15
Posts: 6

Re: Customize RSS Feeds : show images without mouse hover

I did some research and GLPI is using SimplePie to fetch and display RSS feeds.

So I updated the following file glpi/src/RSSFeed.php

I did some cosmetic changes and also added this code near the end ;


$doc = new DOMDocument();
@$doc->loadHTML($item->get_content());
$imgs = $doc->getElementsbyTagName('img');
$res = $imgs->item(0)->getAttribute('src');
$output .= "<br><img src='" . $res . "' width='400' height='300'><br><br>";

Offline

Board footer

Powered by FluxBB