Merge branch 'master' into 10500
This commit is contained in:
commit
688c923214
@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## version 10.4.03
|
||||||
|
- Corrections :
|
||||||
|
- En-tête html : absence de la langue.
|
||||||
|
- Suppression de la balise sémantique <article>.
|
||||||
|
- Génération image Opengraph, mauvaise redirection.
|
||||||
|
- Nouvelle structure de données articles de blog dans le sitemap.
|
||||||
|
|
||||||
## version 10.4.02
|
## version 10.4.02
|
||||||
- Corrections :
|
- Corrections :
|
||||||
- Thème : aperçu du site amélioré.
|
- Thème : aperçu du site amélioré.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
# ZwiiCMS 10.4.02
|
# ZwiiCMS 10.4.03
|
||||||
|
|
||||||
Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.
|
Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.
|
||||||
|
|
||||||
|
@ -767,6 +767,16 @@ class common {
|
|||||||
if ($this->getData(['page', $parentPageId, 'disable']) !== true ) {
|
if ($this->getData(['page', $parentPageId, 'disable']) !== true ) {
|
||||||
$sitemap->addUrl ($parentPageId,$datetime);
|
$sitemap->addUrl ($parentPageId,$datetime);
|
||||||
}
|
}
|
||||||
|
// Articles du blog
|
||||||
|
if ($this->getData(['page', $parentPageId, 'moduleId']) === 'blog' &&
|
||||||
|
!empty($this->getData(['module',$parentPageId])) ) {
|
||||||
|
foreach($this->getData(['module',$parentPageId,'posts']) as $articleId => $article) {
|
||||||
|
if($this->getData(['module',$parentPageId,'posts',$articleId,'state']) === true) {
|
||||||
|
$date = $this->getData(['module',$parentPageId,'posts',$articleId,'publishedOn']);
|
||||||
|
$sitemap->addUrl( $parentPageId . '/' . $articleId , new DateTime("@{$date}",new DateTimeZone($timezone)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// Sous-pages
|
// Sous-pages
|
||||||
foreach($childrenPageIds as $childKey) {
|
foreach($childrenPageIds as $childKey) {
|
||||||
if ($this->getData(['page',$childKey,'group']) !== 0 || $this->getData(['page', $childKey, 'disable']) === true) {
|
if ($this->getData(['page',$childKey,'group']) !== 0 || $this->getData(['page', $childKey, 'disable']) === true) {
|
||||||
@ -777,24 +787,15 @@ class common {
|
|||||||
// La sous-page est un blog
|
// La sous-page est un blog
|
||||||
if ($this->getData(['page', $childKey, 'moduleId']) === 'blog' &&
|
if ($this->getData(['page', $childKey, 'moduleId']) === 'blog' &&
|
||||||
!empty($this->getData(['module',$childKey])) ) {
|
!empty($this->getData(['module',$childKey])) ) {
|
||||||
foreach($this->getData(['module',$childKey]) as $articleId => $article) {
|
foreach($this->getData(['module',$childKey,'posts']) as $articleId => $article) {
|
||||||
if($this->getData(['module',$childKey,$articleId,'state']) === true) {
|
if($this->getData(['module',$childKey,'posts',$articleId,'state']) === true) {
|
||||||
$date = $this->getData(['module',$childKey,$articleId,'publishedOn']);
|
$date = $this->getData(['module',$childKey,'posts',$articleId,'publishedOn']);
|
||||||
$sitemap->addUrl( $childKey . '/' . $articleId , new DateTime("@{$date}",new DateTimeZone($timezone)));
|
$sitemap->addUrl( $childKey . '/' . $articleId , new DateTime("@{$date}",new DateTimeZone($timezone)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Articles du blog
|
|
||||||
if ($this->getData(['page', $parentPageId, 'moduleId']) === 'blog' &&
|
|
||||||
!empty($this->getData(['module',$parentPageId])) ) {
|
|
||||||
foreach($this->getData(['module',$parentPageId]) as $articleId => $article) {
|
|
||||||
if($this->getData(['module',$parentPageId,$articleId,'state']) === true) {
|
|
||||||
$date = $this->getData(['module',$parentPageId,$articleId,'publishedOn']);
|
|
||||||
$sitemap->addUrl( $parentPageId . '/' . $articleId , new DateTime("@{$date}",new DateTimeZone($timezone)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// generating internally a sitemap
|
// generating internally a sitemap
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?php $layout = new layout($this);
|
<?php $layout = new layout($this);?>
|
||||||
$lan = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); ?>
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html prefix="og: http://ogp.me/ns#" lang="<?php echo $lan;?>">
|
<html prefix="og: http://ogp.me/ns#" lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
@ -285,16 +285,20 @@ class config extends common {
|
|||||||
$data = str_replace('_','/',$googlePagespeedData['lighthouseResult']['audits']['final-screenshot']['details']['data']);
|
$data = str_replace('_','/',$googlePagespeedData['lighthouseResult']['audits']['final-screenshot']['details']['data']);
|
||||||
$data = str_replace('-','+',$data);
|
$data = str_replace('-','+',$data);
|
||||||
$img = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $data));
|
$img = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $data));
|
||||||
$success = file_put_contents( self::FILE_DIR.'source/screenshot.jpg',$img) ;
|
// Effacer l'image et la miniature png
|
||||||
// Effacer la miniature png
|
if (file_exists(self::FILE_DIR.'thumb/screenshot.jpg')) {
|
||||||
if (file_exists(self::FILE_DIR.'source/screenshot.png')) {
|
unlink (self::FILE_DIR.'thumb/screenshot.jpg');
|
||||||
unlink (self::FILE_DIR.'source/screenshot.png');
|
|
||||||
}
|
}
|
||||||
|
if (file_exists(self::FILE_DIR.'source/screenshot.jpg')) {
|
||||||
|
unlink (self::FILE_DIR.'source/screenshot.jpg');
|
||||||
|
}
|
||||||
|
$success = file_put_contents( self::FILE_DIR.'source/screenshot.jpg',$img) ;
|
||||||
|
|
||||||
}
|
}
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'notification' => $success === false ? 'Service inaccessible ou erreur d\'écriture de l\'image' : 'Image générée avec succès',
|
'notification' => $success === false ? 'Service inaccessible ou erreur d\'écriture de l\'image' : 'Image générée avec succès',
|
||||||
'redirect' => helper::baseUrl() . 'advanced',
|
'redirect' => helper::baseUrl() . 'config/advanced',
|
||||||
'state' => $success === false ? false : true
|
'state' => $success === false ? false : true
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -375,13 +379,6 @@ class config extends common {
|
|||||||
$this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true) {
|
$this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true) {
|
||||||
$this->setData(['user',$users]);
|
$this->setData(['user',$users]);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
if ($version === '9' ) {
|
|
||||||
$this->importData($this->getInput('configManageImportUser', helper::FILTER_BOOLEAN));
|
|
||||||
$this->setData(['core','dataVersion',0]);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// Met à jours les URL dans les contenus de page
|
|
||||||
|
|
||||||
// Message de notification
|
// Message de notification
|
||||||
$notification = $success === true ? 'Restauration réalisée avec succès' : 'Erreur inconnue';
|
$notification = $success === true ? 'Restauration réalisée avec succès' : 'Erreur inconnue';
|
||||||
@ -452,12 +449,7 @@ class config extends common {
|
|||||||
'state' => $success
|
'state' => $success
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Initialisation du screen - APPEL AUTO DESACTIVE POUR EVITER UN RALENTISSEMENT
|
|
||||||
/*
|
|
||||||
if (!file_exists(self::FILE_DIR.'source/screenshot.jpg')) {
|
|
||||||
$this->configMetaImage();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'title' => 'Configuration',
|
'title' => 'Configuration',
|
||||||
|
@ -87,7 +87,7 @@ class blog extends common {
|
|||||||
|
|
||||||
public static $users = [];
|
public static $users = [];
|
||||||
|
|
||||||
const VERSION = '4.2';
|
const VERSION = '4.3';
|
||||||
const REALNAME = 'Blog';
|
const REALNAME = 'Blog';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,154 +1,152 @@
|
|||||||
<article>
|
<div class="row">
|
||||||
<div class="row">
|
<div class="col10">
|
||||||
<div class="col10">
|
<div class="blogDate">
|
||||||
<div class="blogDate">
|
<i class="far fa-calendar-alt"></i>
|
||||||
<i class="far fa-calendar-alt"></i>
|
<?php $date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
|
||||||
<?php $date = mb_detect_encoding(strftime('%d %B %Y', $this->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']))
|
||||||
? 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'])));
|
||||||
: 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)
|
||||||
$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']))
|
||||||
? 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'])));
|
||||||
: utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])));
|
echo $date . ' à ' . $heure;
|
||||||
echo $date . ' à ' . $heure;
|
?>
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col2">
|
|
||||||
<?php if (
|
|
||||||
$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']
|
|
||||||
)
|
|
||||||
)
|
|
||||||
): ?>
|
|
||||||
<?php echo template::button('blogEdit', [
|
|
||||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'],
|
|
||||||
'value' => 'Editer'
|
|
||||||
]); ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php $pictureSize = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']); ?>
|
<div class="col2">
|
||||||
<?php if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'hidePicture']) == false) {
|
<?php if (
|
||||||
echo '<img class="blogArticlePicture blogArticlePicture' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picturePosition']) .
|
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||||
' pict' . $pictureSize . '" src="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) .
|
AND
|
||||||
'" alt="' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) . '">';
|
( // Propriétaire
|
||||||
} ?>
|
(
|
||||||
<?php echo $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(1), 'content']); ?>
|
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === $module::EDIT_OWNER
|
||||||
<p class="clearBoth signature"><?php echo $module::$articleSignature;?></p>
|
AND ( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'userId']) === $this->getUser('id')
|
||||||
<!-- Bloc RSS-->
|
OR $this->getUser('group') === self::GROUP_ADMIN )
|
||||||
<?php if ($this->getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
|
)
|
||||||
<div id="rssFeed">
|
OR (
|
||||||
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?> ">
|
// Groupe
|
||||||
<img src='module/news/ressource/feed-icon-16.gif' />
|
( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === self::GROUP_ADMIN
|
||||||
<?php
|
OR $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === self::GROUP_MODERATOR)
|
||||||
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
|
AND $this->getUser('group') >= $this->getData(['module',$this->getUrl(0), 'posts', $this->getUrl(1),'editConsent'])
|
||||||
?>
|
)
|
||||||
</a>
|
OR (
|
||||||
</div>
|
// Tout le monde
|
||||||
<?php endif; ?>
|
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === $module::EDIT_ALL
|
||||||
<?php if($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentClose'])): ?>
|
AND $this->getUser('group') >= $module::$actions['config']
|
||||||
<p>Cet article ne reçoit pas de commentaire.</p>
|
)
|
||||||
<?php else: ?>
|
)
|
||||||
<h3 id="comment">
|
): ?>
|
||||||
<?php //$commentsNb = count($module::$comments); ?>
|
<?php echo template::button('blogEdit', [
|
||||||
<?php $commentsNb = $module::$nbCommentsApproved; ?>
|
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'],
|
||||||
<?php $s = $commentsNb === 1 ? '': 's' ?>
|
'value' => 'Editer'
|
||||||
<?php echo $commentsNb > 0 ? $commentsNb . ' ' . 'commentaire' . $s : 'Pas encore de commentaire'; ?>
|
|
||||||
</h3>
|
|
||||||
<?php echo template::formOpen('blogArticleForm'); ?>
|
|
||||||
<?php echo template::text('blogArticleCommentShow', [
|
|
||||||
'placeholder' => 'Rédiger un commentaire...',
|
|
||||||
'readonly' => true
|
|
||||||
]); ?>
|
|
||||||
<div id="blogArticleCommentWrapper" class="displayNone">
|
|
||||||
<?php if($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')): ?>
|
|
||||||
<?php echo template::text('blogArticleUserName', [
|
|
||||||
'label' => 'Nom',
|
|
||||||
'readonly' => true,
|
|
||||||
'value' => $module::$editCommentSignature
|
|
||||||
]); ?>
|
|
||||||
<?php echo template::hidden('blogArticleUserId', [
|
|
||||||
'value' => $this->getUser('id')
|
|
||||||
]); ?>
|
|
||||||
<?php else: ?>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col9">
|
|
||||||
<?php echo template::text('blogArticleAuthor', [
|
|
||||||
'label' => 'Nom'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col1 textAlignCenter verticalAlignBottom">
|
|
||||||
<div id="blogArticleOr">Ou</div>
|
|
||||||
</div>
|
|
||||||
<div class="col2 verticalAlignBottom">
|
|
||||||
<?php echo template::button('blogArticleLogin', [
|
|
||||||
'href' => helper::baseUrl() . 'user/login/' . str_replace('/', '_', $this->getUrl()) . '__comment',
|
|
||||||
'value' => 'Connexion'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php echo template::textarea('blogArticleContent', [
|
|
||||||
'label' => 'Commentaire avec maximum '.$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentMaxlength']).' caractères',
|
|
||||||
'class' => 'editorWysiwygComment',
|
|
||||||
'noDirty' => true,
|
|
||||||
'maxlength' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentMaxlength'])
|
|
||||||
]); ?>
|
]); ?>
|
||||||
<div id="blogArticleContentAlarm"> </div>
|
<?php endif; ?>
|
||||||
<?php if($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')): ?>
|
</div>
|
||||||
<div class="row">
|
</div>
|
||||||
<div class="col12">
|
<?php $pictureSize = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']); ?>
|
||||||
<?php echo template::captcha('blogArticleCaptcha', [
|
<?php if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'hidePicture']) == false) {
|
||||||
'limit' => $this->getData(['config','captchaStrong'])
|
echo '<img class="blogArticlePicture blogArticlePicture' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picturePosition']) .
|
||||||
]); ?>
|
' pict' . $pictureSize . '" src="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) .
|
||||||
</div>
|
'" alt="' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) . '">';
|
||||||
</div>
|
} ?>
|
||||||
<?php endif; ?>
|
<?php echo $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(1), 'content']); ?>
|
||||||
|
<p class="clearBoth signature"><?php echo $module::$articleSignature;?></p>
|
||||||
|
<!-- Bloc RSS-->
|
||||||
|
<?php if ($this->getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
|
||||||
|
<div id="rssFeed">
|
||||||
|
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?> ">
|
||||||
|
<img src='module/news/ressource/feed-icon-16.gif' />
|
||||||
|
<?php
|
||||||
|
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
|
||||||
|
?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentClose'])): ?>
|
||||||
|
<p>Cet article ne reçoit pas de commentaire.</p>
|
||||||
|
<?php else: ?>
|
||||||
|
<h3 id="comment">
|
||||||
|
<?php //$commentsNb = count($module::$comments); ?>
|
||||||
|
<?php $commentsNb = $module::$nbCommentsApproved; ?>
|
||||||
|
<?php $s = $commentsNb === 1 ? '': 's' ?>
|
||||||
|
<?php echo $commentsNb > 0 ? $commentsNb . ' ' . 'commentaire' . $s : 'Pas encore de commentaire'; ?>
|
||||||
|
</h3>
|
||||||
|
<?php echo template::formOpen('blogArticleForm'); ?>
|
||||||
|
<?php echo template::text('blogArticleCommentShow', [
|
||||||
|
'placeholder' => 'Rédiger un commentaire...',
|
||||||
|
'readonly' => true
|
||||||
|
]); ?>
|
||||||
|
<div id="blogArticleCommentWrapper" class="displayNone">
|
||||||
|
<?php if($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')): ?>
|
||||||
|
<?php echo template::text('blogArticleUserName', [
|
||||||
|
'label' => 'Nom',
|
||||||
|
'readonly' => true,
|
||||||
|
'value' => $module::$editCommentSignature
|
||||||
|
]); ?>
|
||||||
|
<?php echo template::hidden('blogArticleUserId', [
|
||||||
|
'value' => $this->getUser('id')
|
||||||
|
]); ?>
|
||||||
|
<?php else: ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col2 offset8">
|
<div class="col9">
|
||||||
<?php echo template::button('blogArticleCommentHide', [
|
<?php echo template::text('blogArticleAuthor', [
|
||||||
'class' => 'buttonGrey',
|
'label' => 'Nom'
|
||||||
'value' => 'Annuler'
|
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col2">
|
<div class="col1 textAlignCenter verticalAlignBottom">
|
||||||
<?php echo template::submit('blogArticleSubmit', [
|
<div id="blogArticleOr">Ou</div>
|
||||||
'value' => 'Envoyer',
|
</div>
|
||||||
'ico' => ''
|
<div class="col2 verticalAlignBottom">
|
||||||
|
<?php echo template::button('blogArticleLogin', [
|
||||||
|
'href' => helper::baseUrl() . 'user/login/' . str_replace('/', '_', $this->getUrl()) . '__comment',
|
||||||
|
'value' => 'Connexion'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php echo template::textarea('blogArticleContent', [
|
||||||
|
'label' => 'Commentaire avec maximum '.$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentMaxlength']).' caractères',
|
||||||
|
'class' => 'editorWysiwygComment',
|
||||||
|
'noDirty' => true,
|
||||||
|
'maxlength' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentMaxlength'])
|
||||||
|
]); ?>
|
||||||
|
<div id="blogArticleContentAlarm"> </div>
|
||||||
|
<?php if($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')): ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col12">
|
||||||
|
<?php echo template::captcha('blogArticleCaptcha', [
|
||||||
|
'limit' => $this->getData(['config','captchaStrong'])
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col2 offset8">
|
||||||
|
<?php echo template::button('blogArticleCommentHide', [
|
||||||
|
'class' => 'buttonGrey',
|
||||||
|
'value' => 'Annuler'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col2">
|
||||||
|
<?php echo template::submit('blogArticleSubmit', [
|
||||||
|
'value' => 'Envoyer',
|
||||||
|
'ico' => ''
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif;?>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col12">
|
|
||||||
<?php foreach($module::$comments as $commentId => $comment): ?>
|
|
||||||
<div class="block">
|
|
||||||
<h4><?php echo $module::$commentsSignature[$commentId]; ?>
|
|
||||||
le <?php echo mb_detect_encoding(strftime('%d %B %Y - %H:%M', $comment['createdOn']), 'UTF-8', true)
|
|
||||||
? strftime('%d %B %Y - %H:%M', $comment['createdOn'])
|
|
||||||
: utf8_encode(strftime('%d %B %Y - %H:%M', $comment['createdOn']));
|
|
||||||
?>
|
|
||||||
<?php echo $comment['content']; ?>
|
|
||||||
</div>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</div>
|
</div>
|
||||||
|
<?php endif;?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col12">
|
||||||
|
<?php foreach($module::$comments as $commentId => $comment): ?>
|
||||||
|
<div class="block">
|
||||||
|
<h4><?php echo $module::$commentsSignature[$commentId]; ?>
|
||||||
|
le <?php echo mb_detect_encoding(strftime('%d %B %Y - %H:%M', $comment['createdOn']), 'UTF-8', true)
|
||||||
|
? strftime('%d %B %Y - %H:%M', $comment['createdOn'])
|
||||||
|
: utf8_encode(strftime('%d %B %Y - %H:%M', $comment['createdOn']));
|
||||||
|
?>
|
||||||
|
<?php echo $comment['content']; ?>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php echo $module::$pages; ?>
|
</div>
|
||||||
</article>
|
<?php echo $module::$pages; ?>
|
@ -21,7 +21,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col9">
|
<div class="col9">
|
||||||
<article>
|
|
||||||
<h1 class="blogTitle">
|
<h1 class="blogTitle">
|
||||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">
|
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">
|
||||||
<?php echo $article['title']; ?>
|
<?php echo $article['title']; ?>
|
||||||
@ -45,7 +44,6 @@
|
|||||||
<?php echo helper::subword(strip_tags($article['content']), 0, 400); ?>...
|
<?php echo helper::subword(strip_tags($article['content']), 0, 400); ?>...
|
||||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">Lire la suite</a>
|
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">Lire la suite</a>
|
||||||
</p>
|
</p>
|
||||||
</article>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user