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