From 9bad522dde494eaf29e06e9e697d847038c51384 Mon Sep 17 00:00:00 2001 From: JeromeB Date: Sat, 14 Dec 2024 14:21:50 +0100 Subject: [PATCH] Ajout : Widget news Devome --- admin/controleurs/admin_accueil.php | 14 ++++++++++++++ admin/templates/admin_accueil.twig | 19 +++++++++++++++++-- include/config.inc.php | 3 +++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/admin/controleurs/admin_accueil.php b/admin/controleurs/admin_accueil.php index 5bebf5064..b36498145 100644 --- a/admin/controleurs/admin_accueil.php +++ b/admin/controleurs/admin_accueil.php @@ -49,5 +49,19 @@ get_vocab_admin("nom_beneficiaire"); list($trad['dNombreModeration'], $trad['dListeModeration']) = AdminFonctions::ReservationsAModerer(getUserName()); +// Widget news devome +$url = "https://grr.devome.com/API/information.php?flux=".$gFluxNewsDevome; +$opts = [ + 'http' => [ + 'method' => 'GET', + 'header' => [ + 'User-Agent: PHP' + ] + ] +]; +$ctx = stream_context_create($opts); +$d['newsDevome'] = @file_get_contents( $url, 0, $ctx ); + +// echo $twig->render('admin_accueil.twig', array('liensMenu' => $menuAdminT, 'liensMenuN2' => $menuAdminTN2, 'd' => $d, 'trad' => $trad, 'settings' => $AllSettings)); ?> \ No newline at end of file diff --git a/admin/templates/admin_accueil.twig b/admin/templates/admin_accueil.twig index a5fc2fe05..728b92dc0 100644 --- a/admin/templates/admin_accueil.twig +++ b/admin/templates/admin_accueil.twig @@ -80,9 +80,24 @@
- +
- + +
+
+

+ + Actualités DEVOME +

+
+
+
+ {{d.newsDevome|raw}} +
+
+
+ +

diff --git a/include/config.inc.php b/include/config.inc.php index 1d6111335..7d8bed9cf 100644 --- a/include/config.inc.php +++ b/include/config.inc.php @@ -128,6 +128,9 @@ #Rechercher des MAJ sur le serveur grr.devome.com || 0: non ; 1: oui - Defaut 1 $recherche_MAJ = 1; +# Identifiant du flux de news || Defaut Hkq45qzeuy74cw54sdf7 +$gFluxNewsDevome = "Hkq45qzeuy74cw54sdf7"; + #Activer la possibilité d'utiliser l'option forcer MAJ || 0: non ; 1: oui - Defaut 1 $forcer_MAJ = 1;