From 154278ef9824b6a4a97c3536ef55c3962defdadf Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 15 Mar 2021 16:40:29 +0100 Subject: [PATCH] modules blog et download WIP --- core/core.php | 2 +- module/blog/view/article/article.css | 1 + module/blog/view/article/article.php | 115 ++++++++++++++------------- module/download/view/item/item.php | 27 +++---- 4 files changed, 75 insertions(+), 70 deletions(-) diff --git a/core/core.php b/core/core.php index b915ca85..c1c8e23d 100755 --- a/core/core.php +++ b/core/core.php @@ -812,7 +812,7 @@ class common { $sitemap->updateRobots(); // Submit your sitemaps to Google, Yahoo, Bing and Ask.com - $sitemap->submitSitemap(); + //$sitemap->submitSitemap(); return(file_exists('sitemap.xml')); diff --git a/module/blog/view/article/article.css b/module/blog/view/article/article.css index 763f8384..bec76899 100755 --- a/module/blog/view/article/article.css +++ b/module/blog/view/article/article.css @@ -45,6 +45,7 @@ font-size:0.8em; font-style: italic; color: grey; + height: 100%; } @media (max-width: 767px) { .blogArticlePicture { diff --git a/module/blog/view/article/article.php b/module/blog/view/article/article.php index aa19fe55..2e07f34d 100755 --- a/module/blog/view/article/article.php +++ b/module/blog/view/article/article.php @@ -1,66 +1,73 @@
-
-
- - getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) - ? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])) - : utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))); - $heure = mb_detect_encoding(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) - ? strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])) - : utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))); - echo $date . ' à ' . $heure; - ?> -
+
+ getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']); ?> + getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'hidePicture']) == false) { + echo '' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) . ''; + } ?> + getData(['module', $this->getUrl(0),'posts', $this->getUrl(1), 'content']); ?>
-
+
+
+
+ + + + getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) + ? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])) + : utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))); + $heure = mb_detect_encoding(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) + ? strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])) + : utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))); + echo $date . ' à ' . $heure; + ?> + + getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?> + + +
+
getUser('password') === $this->getInput('ZWII_USER_PASSWORD') - AND - ( // Propriétaire - ( - $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === $module::EDIT_OWNER - AND ( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'userId']) === $this->getUser('id') - OR $this->getUser('group') === self::GROUP_ADMIN ) + + $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') + AND + ( // Propriétaire + ( + $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === $module::EDIT_OWNER + AND ( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'userId']) === $this->getUser('id') + OR $this->getUser('group') === self::GROUP_ADMIN ) + ) + OR ( + // Groupe + ( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === self::GROUP_ADMIN + OR $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === self::GROUP_MODERATOR) + AND $this->getUser('group') >= $this->getData(['module',$this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) + ) + OR ( + // Tout le monde + $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === $module::EDIT_ALL + AND $this->getUser('group') >= $module::$actions['config'] ) - OR ( - // Groupe - ( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === self::GROUP_ADMIN - OR $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === self::GROUP_MODERATOR) - AND $this->getUser('group') >= $this->getData(['module',$this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) - ) - OR ( - // Tout le monde - $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === $module::EDIT_ALL - AND $this->getUser('group') >= $module::$actions['config'] - ) - ) - ): ?> + ) + ): ?> + + + helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'], - 'value' => 'Editer' - ]); ?> + 'value' => template::ico('pencil') + ]); ?>
- getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']); ?> - getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'hidePicture']) == false) { - echo '' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) . ''; - } ?> -getData(['module', $this->getUrl(0),'posts', $this->getUrl(1), 'content']); ?> -

- -getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?> - - getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentClose'])): ?>

Cet article ne reçoit pas de commentaire.

diff --git a/module/download/view/item/item.php b/module/download/view/item/item.php index 6b1a7e10..2eeba01c 100644 --- a/module/download/view/item/item.php +++ b/module/download/view/item/item.php @@ -9,7 +9,6 @@
- getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) ? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])) : utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn']))); @@ -18,9 +17,20 @@ : utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn']))); echo $date . ' à ' . $heure; ?> + + getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?> + +
-
+
getUser('password') === $this->getInput('ZWII_USER_PASSWORD') AND @@ -50,19 +60,6 @@
- -
-
- getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?> - - - ' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '

' ; - ?> -
- -
-