Dates UTF8
This commit is contained in:
parent
c88da6198b
commit
af3d4dfa41
@ -23,7 +23,7 @@ if(version_compare(PHP_VERSION, '5.6.0', '<')) {
|
||||
|
||||
/* Set locale to French */
|
||||
date_default_timezone_set('Europe/Paris');
|
||||
setlocale (LC_TIME, 'fra_FRA', 'french');
|
||||
setlocale (LC_TIME, 'fr_FR.utf8','fra');
|
||||
|
||||
/**
|
||||
* Initialisation de Zwii
|
||||
|
@ -127,7 +127,7 @@ class blog extends common {
|
||||
// Met en forme le tableau
|
||||
$comment = $comments[$commentIds[$i]];
|
||||
self::$comments[] = [
|
||||
utf8_encode(strftime('%d %B %Y - %H:%M', $comment['createdOn'])),
|
||||
strftime('%d %B %Y - %H:%M', $comment['createdOn']),
|
||||
$comment['content'],
|
||||
$comment['userId'] ? $this->getData(['user', $comment['userId'], 'firstname']) . ' ' . $this->getData(['user', $comment['userId'], 'lastname']) : $comment['author'],
|
||||
template::button('blogCommentDelete' . $commentIds[$i], [
|
||||
@ -191,9 +191,9 @@ class blog extends common {
|
||||
self::$articles[] = [
|
||||
$this->getData(['module', $this->getUrl(0), $articleIds[$i], 'title']),
|
||||
// date('d/m/Y H:i', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])),
|
||||
utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])))
|
||||
strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn']))
|
||||
.' à '.
|
||||
utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn']))),
|
||||
strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])),
|
||||
self::$states[$this->getData(['module', $this->getUrl(0), $articleIds[$i], 'state'])],
|
||||
template::button('blogConfigEdit' . $articleIds[$i], [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $articleIds[$i] . '/' . $_SESSION['csrf'],
|
||||
|
@ -2,8 +2,8 @@
|
||||
<div class="col10">
|
||||
<div class="blogDate">
|
||||
<i class="far fa-calendar-alt"></i>
|
||||
<?php echo utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); ?>
|
||||
à <?php echo utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); ?>
|
||||
<?php echo strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])); ?>
|
||||
à <?php echo strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(
|
||||
@ -21,7 +21,7 @@
|
||||
<?php $pictureSize = $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'pictureSize']); ?>
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'hidePicture']) == false) {
|
||||
echo '<img class="blogArticlePicture blogArticlePicture' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picturePosition']) .
|
||||
' pict' . $pictureSize . '" src="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) .
|
||||
' pict' . $pictureSize . '" src="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) .
|
||||
'" alt="' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) . '">';
|
||||
} ?>
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
<?php else: ?>
|
||||
<?php echo $comment['author']; ?>
|
||||
<?php endif; ?>
|
||||
le <?php echo utf8_encode(strftime('%d %B %Y - %H:%M', $comment['createdOn'])); ?>
|
||||
le <?php echo strftime('%d %B %Y - %H:%M', $comment['createdOn']); ?>
|
||||
</h4>
|
||||
<?php echo $comment['content']; ?>
|
||||
</div>
|
||||
|
@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<div class="blogDate">
|
||||
<i class="far fa-calendar-alt"></i>
|
||||
<?php echo utf8_encode(strftime('%d %B %Y', $article['publishedOn'])); ?>
|
||||
<?php echo strftime('%d %B %Y', $article['publishedOn']); ?>
|
||||
</div>
|
||||
<p class="blogContent">
|
||||
<?php echo helper::subword(strip_tags($article['content']), 0, 400); ?>...
|
||||
|
@ -91,9 +91,9 @@ class news extends common {
|
||||
// Met en forme le tableau
|
||||
self::$news[] = [
|
||||
$this->getData(['module', $this->getUrl(0), $newsIds[$i], 'title']),
|
||||
utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])))
|
||||
strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn']))
|
||||
.' à '.
|
||||
utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn']))),
|
||||
strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])),
|
||||
self::$states[$this->getData(['module', $this->getUrl(0), $newsIds[$i], 'state'])],
|
||||
template::button('newsConfigEdit' . $newsIds[$i], [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $newsIds[$i]. '/' . $_SESSION['csrf'],
|
||||
|
@ -4,16 +4,16 @@
|
||||
<?php foreach($module::$news as $newsId => $news): ?>
|
||||
<h1 class="newsTitle">
|
||||
<?php echo $news['title']; ?>
|
||||
</h1>
|
||||
</h1>
|
||||
<div class="newsContent">
|
||||
<?php echo $news['content']; ?>
|
||||
</div>
|
||||
<div class="newsSignature">
|
||||
<i class="far fa-calendar-alt"></i>
|
||||
<?php echo utf8_encode(strftime('%d %B %Y', $news['publishedOn'])); ?>
|
||||
<i class="far fa-calendar-alt"></i>
|
||||
<?php echo strftime('%d %B %Y', $news['publishedOn']); ?>
|
||||
- <?php echo $this->getData(['user', $news['userId'], 'firstname']) . ' ' . $this->getData(['user', $news['userId'], 'lastname']); ?>
|
||||
</div>
|
||||
<div class="clearBoth"></div>
|
||||
<div class="clearBoth"></div>
|
||||
<hr />
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user