Skip to content

Commit

Permalink
Ajout : Widget news Devome
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeDevome committed Dec 14, 2024
1 parent 2aba0a9 commit 9bad522
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
14 changes: 14 additions & 0 deletions admin/controleurs/admin_accueil.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
?>
19 changes: 17 additions & 2 deletions admin/templates/admin_accueil.twig
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,24 @@
</div>
<div class="row">

<!-- Nombre d'utilisateur connecté -->

<div class="col col-md-6 col-sm-12 col-xs-12">
<!-- /.box-header -->
<!-- Nombre d'utilisateur connecté -->
<div class="card">
<div class="card-header">
<h3 class="card-title">
<i class="fas fa-newspaper mr-1"></i>
Actualités DEVOME
</h3>
</div><!-- /.card-header -->
<div class="card-body">
<div class="tab-content p-0">
{{d.newsDevome|raw}}
</div>
</div><!-- /.card-body -->
</div>

<!-- Nombre d'utilisateur connecté -->
<div class="card">
<div class="card-header">
<h3 class="card-title">
Expand Down
3 changes: 3 additions & 0 deletions include/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9bad522

Please sign in to comment.