From bde4a8f55cd5f4e509745c9013f359c2d4f29d94 Mon Sep 17 00:00:00 2001
From: RealET <real3t@gmail.com>
Date: Fri, 2 Jul 2021 20:34:33 +0200
Subject: [PATCH] =?UTF-8?q?[Mode=20international]=20Param=C3=A9trage=20des?=
 =?UTF-8?q?=20horloges=20en=20page=20d'accueil=20via=20la=20config=20de=20?=
 =?UTF-8?q?SoyezCr=C3=A9ateurs?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 formulaires/configurer_soyezcreateurs.html          | 10 ++++++++++
 lang/soyezcreateursprive_fr.php                     |  2 ++
 .../inc_sommaire_modeinternational_horloges.html    | 13 ++++++-------
 3 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/formulaires/configurer_soyezcreateurs.html b/formulaires/configurer_soyezcreateurs.html
index c4647996..1c4a0a05 100755
--- a/formulaires/configurer_soyezcreateurs.html
+++ b/formulaires/configurer_soyezcreateurs.html
@@ -59,6 +59,16 @@ if (!function_exists('sc_ouinon_default')) {
 					)]
 					]
 
+					[(#CONFIG{soyezcreateurs/mode_affichage,communiquant}|=={international}|oui)
+					[(#SAISIE{textarea,horloges,
+						class=no_barre,
+						rows=3,
+						label=<:soyezcreateursprive:cfg_horloges_label:>,
+						defaut='-5;Washington|-4;Kourou|1;Evry|5;Baïkonour|7;Singapour|8;Tokyo|8;Vostochny',
+						explication=<:soyezcreateursprive:cfg_horloges_label_ex:>}
+					)]
+					]
+
 					[(#CONFIG{soyezcreateurs/mode_affichage,communiquant}|=={portailcognac}|oui)
 					[(#SAISIE{radio,variante_bloccycloshow,
 						label=<:soyezcreateursprive:cfg_variante_bloccycloshow_label:>,
diff --git a/lang/soyezcreateursprive_fr.php b/lang/soyezcreateursprive_fr.php
index 0a7f6075..479fb787 100644
--- a/lang/soyezcreateursprive_fr.php
+++ b/lang/soyezcreateursprive_fr.php
@@ -143,6 +143,8 @@ $GLOBALS[$GLOBALS['idx_lang']] = array(
 	'cfg_homeagenda_centre' => 'Au centre de la page',
 	'cfg_homeagenda_droite' => 'À droite de la page (avec mini calendrier)',
 	'cfg_homeagenda_label' => 'Affichage des événements sur la page d’accueil',
+	'cfg_horloges_label' => 'Horloges mondiales',
+	'cfg_horloges_label_ex' => 'Format : décalage horaire;Nom ville|décalage horaire;Nom ville et ainsi de suite<br />Ex : -5;Washington|1;Paris',
 	'cfg_indexation' => 'Indexation',
 	'cfg_indexation_info' => 'Indexation du site par les moteurs de recherche',
 	'cfg_indexation_non' => 'Ne pas indexer le site dans les moteurs de recherche',
diff --git a/noisettes/sommaire/inc_sommaire_modeinternational_horloges.html b/noisettes/sommaire/inc_sommaire_modeinternational_horloges.html
index a0da639d..84baba3a 100644
--- a/noisettes/sommaire/inc_sommaire_modeinternational_horloges.html
+++ b/noisettes/sommaire/inc_sommaire_modeinternational_horloges.html
@@ -1,8 +1,7 @@
-							<INCLURE{fond=inclure/horlogeflash,timezone=-5,ville='Washington'}>
-							<INCLURE{fond=inclure/horlogeflash,timezone=-3,ville='Kourou'}>
-							<INCLURE{fond=inclure/horlogeflash,timezone=1,ville='Evry'}>
-							<INCLURE{fond=inclure/horlogeflash,timezone=5,ville='Baïkonour'}>
-							<INCLURE{fond=inclure/horlogeflash,timezone=8,ville='Singapour'}>
-							<INCLURE{fond=inclure/horlogeflash,timezone=9,ville='Tokyo'}>
-							<INCLURE{fond=inclure/horlogeflash,timezone=9,ville='Vostochny'}>
+[(#SET{tzstring,#CONFIG{soyezcreateurs/horloges,'-5;Washington|-4;Kourou|1;Evry|5;Baïkonour|7;Singapour|8;Tokyo|8;Vostochny'}})]
+[(#SET{tzarrays,[(#GET{tzstring}|explode{|})]})]
+<BOUCLE_TimeZones(DATA){source table, #GET{tzarrays}}>
+[(#SET{tzarray,[(#VALEUR|explode{';'})]})]
+<INCLURE{fond=inclure/horlogeflash,timezone=#GET{tzarray/0},ville=#GET{tzarray/1}}>
+</BOUCLE_TimeZones>
 #FILTRE{mini_html}
\ No newline at end of file
-- 
GitLab