From fa2e4b2be0e0909461a03a29718e64c36b1283b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 31 Mar 2022 14:57:50 +0200 Subject: [PATCH 1/7] import font locale en test --- core/include/update.inc.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 731798da..4e92dc3e 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -941,10 +941,25 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { if (is_array($files)) { $this->deleteData(['fonts', 'files']); foreach ($files as $fontId => $fontName) { - $this->setData(['fonts', 'files', $fontId, [ - 'name' => ucfirst($fontId), + if (file_exists(self::DIR_DATA . 'fonts' . $fontName)) { + $this->setData(['fonts', 'files', $fontId, [ + 'name' => ucfirst($fontId), + 'font-family'=> $fontId . ', sans-serif', + 'resource' => $fontName + ]]); + } + } + } + // Consersion des fontes importées + // Conversion des fontes locales + $imported = $this->getData(['fonts', 'imported']); + if (is_array($imported)) { + $this->deleteData(['fonts', 'imported']); + foreach ($imported as $fontId => $fontName) { + $this->setData(['fonts', 'imported', $fontId, [ + 'name' => $fontId, 'font-family'=> $fontId . ', sans-serif', - 'resource' => $fontName + 'resource' => 'https:\/\/fonts.cdnfonts.com\/css\/' . $fontId ]]); } } From 3f52396e9dbe02ea7c30727694abe875334404c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 31 Mar 2022 15:03:13 +0200 Subject: [PATCH 2/7] import des fontes WIP --- core/include/update.inc.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 4e92dc3e..61740e49 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -934,7 +934,6 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { 'resource' => 'https://fonts.cdnfonts.com/css/vollkorn' ] ]; - $this->setData(['fonts', 'imported', $fonts]); // Conversion des fontes locales $files = $this->getData(['fonts', 'files']); @@ -950,20 +949,22 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { } } } - // Consersion des fontes importées - // Conversion des fontes locales + // Consersion des fontes importées $imported = $this->getData(['fonts', 'imported']); if (is_array($imported)) { $this->deleteData(['fonts', 'imported']); - foreach ($imported as $fontId => $fontName) { + foreach ($imported as $fontId => $fontUrl) { $this->setData(['fonts', 'imported', $fontId, [ 'name' => $fontId, - 'font-family'=> $fontId . ', sans-serif', - 'resource' => 'https:\/\/fonts.cdnfonts.com\/css\/' . $fontId + 'font-family'=> '"' . $fontId . '", sans-serif', + 'resource' => 'https:\/\/fonts.cdnfonts.com\/css\/' . $fontUrl ]]); } } + + $this->setData(['fonts', 'imported', $fonts]); + // Rafraichir les thèmes if (file_exists(self::DATA_DIR . 'admin.css')) { unlink (self::DATA_DIR . 'admin.css'); From c52c6f4438a76be9f25e55ad7de81e2e7f8a7837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 31 Mar 2022 15:07:16 +0200 Subject: [PATCH 3/7] import de fontes DIR_DATA !!!! --- core/include/update.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 61740e49..ea8ad2a6 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -940,7 +940,7 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { if (is_array($files)) { $this->deleteData(['fonts', 'files']); foreach ($files as $fontId => $fontName) { - if (file_exists(self::DIR_DATA . 'fonts' . $fontName)) { + if (file_exists(self::DATA_DIR . 'fonts' . $fontName)) { $this->setData(['fonts', 'files', $fontId, [ 'name' => ucfirst($fontId), 'font-family'=> $fontId . ', sans-serif', From f35fbb8c7133de2b4b4f5f27fd3185a5965976a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 31 Mar 2022 15:37:44 +0200 Subject: [PATCH 4/7] import presque ok --- core/include/update.inc.php | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/core/include/update.inc.php b/core/include/update.inc.php index ea8ad2a6..d7658cbb 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -938,9 +938,8 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { // Conversion des fontes locales $files = $this->getData(['fonts', 'files']); if (is_array($files)) { - $this->deleteData(['fonts', 'files']); foreach ($files as $fontId => $fontName) { - if (file_exists(self::DATA_DIR . 'fonts' . $fontName)) { + if (file_exists(self::DATA_DIR . 'fonts/' . $fontName)) { $this->setData(['fonts', 'files', $fontId, [ 'name' => ucfirst($fontId), 'font-family'=> $fontId . ', sans-serif', @@ -949,28 +948,22 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { } } } + // Consersion des fontes importées $imported = $this->getData(['fonts', 'imported']); if (is_array($imported)) { - $this->deleteData(['fonts', 'imported']); foreach ($imported as $fontId => $fontUrl) { $this->setData(['fonts', 'imported', $fontId, [ - 'name' => $fontId, + 'name' => ucfirst($fontId), 'font-family'=> '"' . $fontId . '", sans-serif', - 'resource' => 'https:\/\/fonts.cdnfonts.com\/css\/' . $fontUrl + 'resource' => 'https:\\fonts.cdnfonts.com\css' . $fontUrl ]]); } } - - - $this->setData(['fonts', 'imported', $fonts]); - - // Rafraichir les thèmes - if (file_exists(self::DATA_DIR . 'admin.css')) { - unlink (self::DATA_DIR . 'admin.css'); - } - if (file_exists(self::DATA_DIR . 'theme.css')) { - unlink (self::DATA_DIR . 'theme.css'); + // Importation des fontes exemples + $template = $fonts; + foreach ($template as $fontId => $fontValue) { + $this->setData(['fonts', 'imported', $fontId, $fontValue]); } // Transforme les URL en références relatives From 0b2f514320a0af60fa2edbb72e00783e66ea7df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 31 Mar 2022 15:40:16 +0200 Subject: [PATCH 5/7] simple quotes --- core/include/update.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/include/update.inc.php b/core/include/update.inc.php index d7658cbb..38a67b68 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -955,7 +955,7 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { foreach ($imported as $fontId => $fontUrl) { $this->setData(['fonts', 'imported', $fontId, [ 'name' => ucfirst($fontId), - 'font-family'=> '"' . $fontId . '", sans-serif', + 'font-family'=> '\'' . $fontId . '\', sans-serif', 'resource' => 'https:\\fonts.cdnfonts.com\css' . $fontUrl ]]); } From b8016a3bc1a33a5368092bd4c897923230d5136f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 31 Mar 2022 15:43:36 +0200 Subject: [PATCH 6/7] update quotes dans family name --- core/include/update.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 38a67b68..b3b09894 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -942,7 +942,7 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { if (file_exists(self::DATA_DIR . 'fonts/' . $fontName)) { $this->setData(['fonts', 'files', $fontId, [ 'name' => ucfirst($fontId), - 'font-family'=> $fontId . ', sans-serif', + 'font-family'=> '\'' . ucfirst($fontId) . '\', sans-serif', 'resource' => $fontName ]]); } @@ -955,7 +955,7 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { foreach ($imported as $fontId => $fontUrl) { $this->setData(['fonts', 'imported', $fontId, [ 'name' => ucfirst($fontId), - 'font-family'=> '\'' . $fontId . '\', sans-serif', + 'font-family'=> '\'' . ucfirst($fontId) . '\', sans-serif', 'resource' => 'https:\\fonts.cdnfonts.com\css' . $fontUrl ]]); } From cc78360984782b7ec8bd6a42de263ad0863e419c Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 1 Apr 2022 08:36:24 +0200 Subject: [PATCH 7/7] =?UTF-8?q?URL=20lien=20d'aide=20du=20th=C3=A8me?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/theme/view/index/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/module/theme/view/index/index.php b/core/module/theme/view/index/index.php index 97d1f706..f2dd82f0 100644 --- a/core/module/theme/view/index/index.php +++ b/core/module/theme/view/index/index.php @@ -15,7 +15,7 @@
'https://doc.zwiicms.fr/theme-2', + 'href' => 'https://doc.zwiicms.fr/gestion-du-theme', 'target' => '_blank', 'ico' => 'help', 'value' => 'Aide', @@ -73,7 +73,7 @@
'https://doc.zwiicms.fr/theme-2', + 'href' => 'https://doc.zwiicms.fr/gestion-du-theme', 'target' => '_blank', 'ico' => 'help', 'value' => 'Aide',