forked from ZwiiCMS-Team/ZwiiCMS
6.22 blog dateUTF8
This commit is contained in:
parent
a7a4949113
commit
69e5bc3d92
@ -32,6 +32,18 @@ class helper
|
|||||||
return (array_key_exists($text, core::$dialog) && !empty(core::$dialog[$text]) ? core::$dialog[$text] : $text);
|
return (array_key_exists($text, core::$dialog) && !empty(core::$dialog[$text]) ? core::$dialog[$text] : $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Formate la date avec le script strftime en UTF8
|
||||||
|
* Date au format time()
|
||||||
|
* $format strftime
|
||||||
|
*/
|
||||||
|
public static function dateUTF8($format, $date)
|
||||||
|
{
|
||||||
|
return mb_detect_encoding(\PHP81_BC\strftime($format, $date), 'UTF-8', true)
|
||||||
|
? \PHP81_BC\strftime($format, $date)
|
||||||
|
: utf8_encode(\PHP81_BC\strftime($format, $date));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fonction pour assurer la traduction des messages
|
* Fonction pour assurer la traduction des messages
|
||||||
*/
|
*/
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
class blog extends common {
|
class blog extends common {
|
||||||
|
|
||||||
const VERSION = '6.21';
|
const VERSION = '6.22';
|
||||||
const REALNAME = 'Blog';
|
const REALNAME = 'Blog';
|
||||||
const DELETE = true;
|
const DELETE = true;
|
||||||
const UPDATE = '0.0';
|
const UPDATE = '0.0';
|
||||||
@ -307,16 +307,8 @@ class blog extends common {
|
|||||||
'value' => $comment['approval'] === true ? 'A' : 'R'
|
'value' => $comment['approval'] === true ? 'A' : 'R'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
//Date et heure
|
|
||||||
$gdh = mb_detect_encoding(\PHP81_BC\strftime('%d/%m/%y', $comment['createdOn']), 'UTF-8', true)
|
|
||||||
? \PHP81_BC\strftime('%d/%m/%y', $comment['createdOn'])
|
|
||||||
: utf8_encode(\PHP81_BC\strftime('%d/%m/%y', $comment['createdOn']));
|
|
||||||
$gdh .= ' - ';
|
|
||||||
$gdh .= mb_detect_encoding(\PHP81_BC\strftime('%H:%M', $comment['createdOn']), 'UTF-8', true)
|
|
||||||
? \PHP81_BC\strftime('%H:%M', $comment['createdOn'])
|
|
||||||
: utf8_encode(\PHP81_BC\strftime('%H:%M', $comment['createdOn']));
|
|
||||||
self::$comments[] = [
|
self::$comments[] = [
|
||||||
$gdh,
|
helper::dateUTF8('%d %B %Y',$comment['createdOn']) . ' - ' . helper::dateUTF8('%H:%M',$comment['createdOn']),
|
||||||
$comment['content'],
|
$comment['content'],
|
||||||
$comment['userId'] ? $this->getData(['user', $comment['userId'], 'firstname']) . ' ' . $this->getData(['user', $comment['userId'], 'lastname']) : $comment['author'],
|
$comment['userId'] ? $this->getData(['user', $comment['userId'], 'firstname']) . ' ' . $this->getData(['user', $comment['userId'], 'lastname']) : $comment['author'],
|
||||||
$buttonApproval,
|
$buttonApproval,
|
||||||
@ -476,17 +468,11 @@ class blog extends common {
|
|||||||
$approved = count($this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i],'comment']));
|
$approved = count($this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i],'comment']));
|
||||||
}
|
}
|
||||||
// Met en forme le tableau
|
// Met en forme le tableau
|
||||||
$date = mb_detect_encoding(\PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])), 'UTF-8', true)
|
|
||||||
? \PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn']))
|
|
||||||
: utf8_encode(\PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])));
|
|
||||||
$heure = mb_detect_encoding(\PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])), 'UTF-8', true)
|
|
||||||
? \PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn']))
|
|
||||||
: utf8_encode(\PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])));
|
|
||||||
self::$articles[] = [
|
self::$articles[] = [
|
||||||
'<a href="' . helper::baseurl() . $this->getUrl(0) . '/' . $articleIds[$i] . '" target="_blank" >' .
|
'<a href="' . helper::baseurl() . $this->getUrl(0) . '/' . $articleIds[$i] . '" target="_blank" >' .
|
||||||
$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'title']) .
|
$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'title']) .
|
||||||
'</a>',
|
'</a>',
|
||||||
$date .' à '. $heure,
|
helper::dateUTF8('%d %B %Y',$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])) . ' à ' . helper::dateUTF8('%H:%M',$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])),
|
||||||
self::$states[$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'state'])],
|
self::$states[$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'state'])],
|
||||||
// Bouton pour afficher les commentaires de l'article
|
// Bouton pour afficher les commentaires de l'article
|
||||||
template::button('blogConfigComment' . $articleIds[$i], [
|
template::button('blogConfigComment' . $articleIds[$i], [
|
||||||
@ -577,17 +563,11 @@ class blog extends common {
|
|||||||
$approved = count($this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i],'comment']));
|
$approved = count($this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i],'comment']));
|
||||||
}
|
}
|
||||||
// Met en forme le tableau
|
// Met en forme le tableau
|
||||||
$date = mb_detect_encoding(\PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])), 'UTF-8', true)
|
|
||||||
? \PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn']))
|
|
||||||
: utf8_encode(\PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])));
|
|
||||||
$heure = mb_detect_encoding(\PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])), 'UTF-8', true)
|
|
||||||
? \PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn']))
|
|
||||||
: utf8_encode(\PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])));
|
|
||||||
self::$articles[] = [
|
self::$articles[] = [
|
||||||
'<a href="' . helper::baseurl() . $this->getUrl(0) . '/' . $articleIds[$i] . '" target="_blank" >' .
|
'<a href="' . helper::baseurl() . $this->getUrl(0) . '/' . $articleIds[$i] . '" target="_blank" >' .
|
||||||
$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'title']) .
|
$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'title']) .
|
||||||
'</a>',
|
'</a>',
|
||||||
$date .' à '. $heure,
|
helper::dateUTF8('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])) . ' à ' . helper::dateUTF8('%H:%M', $$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])),
|
||||||
self::$states[$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'state'])],
|
self::$states[$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'state'])],
|
||||||
// Bouton pour afficher les commentaires de l'article
|
// Bouton pour afficher les commentaires de l'article
|
||||||
template::button('blogConfigComment' . $articleIds[$i], [
|
template::button('blogConfigComment' . $articleIds[$i], [
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
# version 6.22
|
||||||
|
- mise en oeuvre du helper dateUTF8
|
||||||
|
# version 6.2
|
||||||
|
- date des commentaires
|
||||||
# version 6.1
|
# version 6.1
|
||||||
- Icône RSS, lien incorrectd ans l'article.
|
- Icône RSS, lien incorrectd ans l'article.
|
||||||
# version 6
|
# version 6
|
||||||
|
@ -3,159 +3,151 @@
|
|||||||
<?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 $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 if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'hidePicture']) == false) {
|
<?php if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'hidePicture']) == false) {
|
||||||
echo '<img class="blogArticlePicture blogArticlePicture' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picturePosition']) .
|
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']) .
|
' pict' . $pictureSize . '" src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) .
|
||||||
'" alt="' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) . '">';
|
'" alt="' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) . '">';
|
||||||
} ?>
|
} ?>
|
||||||
<?php echo $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(1), 'content']); ?>
|
<?php echo $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'content']); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row verticalAlignMiddle">
|
<div class="row verticalAlignMiddle">
|
||||||
<div class="col12 blogDate">
|
<div class="col12 blogDate">
|
||||||
<!-- bloc signature et date -->
|
<!-- bloc signature et date -->
|
||||||
<?php echo template::ico('user'); ?>
|
<?php echo template::ico('user'); ?>
|
||||||
<?php echo $module::$articleSignature;?>
|
<?php echo $module::$articleSignature; ?>
|
||||||
<?php echo template::ico('calendar-empty'); ?>
|
<?php echo template::ico('calendar-empty'); ?>
|
||||||
<?php $date = mb_detect_encoding(\PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
|
<?php echo helper::dateUTF8('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])) . ' à ' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])); ?>
|
||||||
? \PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))
|
|
||||||
: utf8_encode(\PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])));
|
|
||||||
$heure = mb_detect_encoding(\PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
|
|
||||||
? \PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))
|
|
||||||
: utf8_encode(\PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])));
|
|
||||||
echo $date . ' à ' . $heure;
|
|
||||||
?>
|
|
||||||
<!-- Bloc edition -->
|
<!-- Bloc edition -->
|
||||||
<?php if (
|
<?php if (
|
||||||
|
|
||||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||||
AND
|
and
|
||||||
( // Propriétaire
|
( // Propriétaire
|
||||||
(
|
($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === $module::EDIT_OWNER
|
||||||
$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')
|
||||||
AND ( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'userId']) === $this->getUser('id')
|
or $this->getUser('group') === self::GROUP_ADMIN)
|
||||||
OR $this->getUser('group') === self::GROUP_ADMIN )
|
)
|
||||||
)
|
or (
|
||||||
OR (
|
|
||||||
// Groupe
|
// Groupe
|
||||||
( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === self::GROUP_ADMIN
|
($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)
|
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'])
|
and $this->getUser('group') >= $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent'])
|
||||||
)
|
)
|
||||||
OR (
|
or (
|
||||||
// Tout le monde
|
// Tout le monde
|
||||||
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === $module::EDIT_ALL
|
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === $module::EDIT_ALL
|
||||||
AND $this->getUser('group') >= $module::$actions['config']
|
and $this->getUser('group') >= $module::$actions['config']
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
): ?>
|
) : ?>
|
||||||
<a href ="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'];?>">
|
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf']; ?>">
|
||||||
<?php echo template::ico('pencil');?> Éditer
|
<?php echo template::ico('pencil'); ?> Éditer
|
||||||
</a>
|
</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<!-- Bloc RSS-->
|
<!-- Bloc RSS-->
|
||||||
<?php if ($this->getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'feeds'])) : ?>
|
||||||
<div id="rssFeed">
|
<div id="rssFeed">
|
||||||
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" target="_blank">
|
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" target="_blank">
|
||||||
<img src='module/blog/ressource/feed-icon-16.gif' />
|
<img src='module/blog/ressource/feed-icon-16.gif' />
|
||||||
<?php
|
<?php
|
||||||
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
|
echo '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>';
|
||||||
?>
|
?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentClose'])): ?>
|
<?php if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentClose'])) : ?>
|
||||||
<p>Cet article ne reçoit pas de commentaire.</p>
|
<p>Cet article ne reçoit pas de commentaire.</p>
|
||||||
<?php else: ?>
|
<?php else : ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12" id="comment">
|
<div class="col12" id="comment">
|
||||||
<h3>
|
<h3>
|
||||||
<?php
|
<?php
|
||||||
echo template::ico('comment', ['margin' => 'right']);
|
echo template::ico('comment', ['margin' => 'right']);
|
||||||
if ($module::$nbCommentsApproved > 0) {
|
if ($module::$nbCommentsApproved > 0) {
|
||||||
echo $module::$nbCommentsApproved . ' commentaire' . ($module::$nbCommentsApproved > 1 ? 's' : '');
|
echo $module::$nbCommentsApproved . ' commentaire' . ($module::$nbCommentsApproved > 1 ? 's' : '');
|
||||||
} else {
|
} else {
|
||||||
echo 'Pas encore de commentaire';
|
echo 'Pas encore de commentaire';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php echo template::formOpen('blogArticleForm'); ?>
|
<?php echo template::formOpen('blogArticleForm'); ?>
|
||||||
<?php echo template::text('blogArticleCommentShow', [
|
<?php echo template::text('blogArticleCommentShow', [
|
||||||
'placeholder' => 'Rédiger un commentaire...',
|
'placeholder' => 'Rédiger un commentaire...',
|
||||||
'readonly' => true
|
'readonly' => true
|
||||||
]); ?>
|
]); ?>
|
||||||
<div id="blogArticleCommentWrapper" class="displayNone">
|
<div id="blogArticleCommentWrapper" class="displayNone">
|
||||||
<?php if($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')): ?>
|
<?php if ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')) : ?>
|
||||||
<?php echo template::text('blogArticleUserName', [
|
<?php echo template::text('blogArticleUserName', [
|
||||||
'label' => 'Nom',
|
'label' => 'Nom',
|
||||||
'readonly' => true,
|
'readonly' => true,
|
||||||
'value' => $module::$editCommentSignature
|
'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 echo template::hidden('blogArticleUserId', [
|
||||||
<?php if($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')): ?>
|
'value' => $this->getUser('id')
|
||||||
<div class="row">
|
]); ?>
|
||||||
<div class="col12">
|
<?php else : ?>
|
||||||
<?php echo template::captcha('blogArticleCaptcha', [
|
|
||||||
'limit' => $this->getData(['config','connect', 'captchaStrong']),
|
|
||||||
'type' => $this->getData(['config','connect', 'captchaType'])
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<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', 'connect', 'captchaStrong']),
|
||||||
|
'type' => $this->getData(['config', 'connect', 'captchaType'])
|
||||||
|
]); ?>
|
||||||
|
</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>
|
||||||
|
<?php endif; ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<?php foreach($module::$comments as $commentId => $comment): ?>
|
<?php foreach ($module::$comments as $commentId => $comment) : ?>
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4><?php echo $module::$commentsSignature[$commentId]; ?>
|
<h4>
|
||||||
le <?php echo mb_detect_encoding(\PHP81_BC\strftime('%d %B %Y - %H:%M', $comment['createdOn']), 'UTF-8', true)
|
<?php echo template::ico('user'); ?>
|
||||||
? \PHP81_BC\strftime('%d %B %Y - %H:%M', $comment['createdOn'])
|
<?php echo $module::$commentsSignature[$commentId]; ?>
|
||||||
: utf8_encode(\PHP81_BC\strftime('%d %B %Y - %H:%M', $comment['createdOn']));
|
<?php echo template::ico('calendar-empty'); ?>
|
||||||
?>
|
<?php echo helper::dateUTF8('%d %B %Y', $comment['createdOn']) . ' à ' . helper::dateUTF8('%H:%M', $comment['createdOn']); ?>
|
||||||
</h4>
|
</h4>
|
||||||
<?php echo $comment['content']; ?>
|
<?php echo $comment['content']; ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,14 +17,7 @@
|
|||||||
<?php echo template::ico('user'); ?>
|
<?php echo template::ico('user'); ?>
|
||||||
<?php echo $module->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId'])); ?>
|
<?php echo $module->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId'])); ?>
|
||||||
<?php echo template::ico('calendar-empty'); ?>
|
<?php echo template::ico('calendar-empty'); ?>
|
||||||
<?php $date = mb_detect_encoding(\PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn'])), 'UTF-8', true)
|
<?php echo helper::dateUTF8('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn'])) . ' à ' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn'])); ?>
|
||||||
? \PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']))
|
|
||||||
: utf8_encode(\PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn'])));
|
|
||||||
$heure = mb_detect_encoding(\PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn'])), 'UTF-8', true)
|
|
||||||
? \PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']))
|
|
||||||
: utf8_encode(\PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn'])));
|
|
||||||
echo $date . ' à ' . $heure;
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -137,14 +130,7 @@
|
|||||||
<?php echo template::ico('user'); ?>
|
<?php echo template::ico('user'); ?>
|
||||||
<?php echo $module->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId']));?>
|
<?php echo $module->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId']));?>
|
||||||
<?php echo template::ico('calendar-empty'); ?>
|
<?php echo template::ico('calendar-empty'); ?>
|
||||||
<?php $date = mb_detect_encoding(\PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
|
<?php echo helper::dateUTF8('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn'])) . ' à ' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn'])); ?>
|
||||||
? \PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))
|
|
||||||
: utf8_encode(\PHP81_BC\strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])));
|
|
||||||
$heure = mb_detect_encoding(\PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
|
|
||||||
? \PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))
|
|
||||||
: utf8_encode(\PHP81_BC\strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])));
|
|
||||||
echo $date . ' à ' . $heure;
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
<p class="blogContent">
|
<p class="blogContent">
|
||||||
<?php $lenght = $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']) !== 0 ? $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']) : 500 ?>
|
<?php $lenght = $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']) !== 0 ? $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']) : 500 ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user