forked from ZwiiCMS-Team/ZwiiCMS
Merge branch '10304' into 10400
This commit is contained in:
commit
31987f4066
@ -20,10 +20,15 @@
|
||||
- Thème : import d'un thème, d'administration impossible.
|
||||
- Thème : import d'un thème, nettoyage du dossier tmp.
|
||||
- Thème administration : modification de l'appel du code CSS permettant une mise à jour du thème sans vider le cache.
|
||||
- Thème du menu : alignement inopérant.
|
||||
- Thème du menu : alignement inopérant ; arrière-plan semi-transparent non uniforme.
|
||||
- Amélioration :
|
||||
- Thème menu : couleurs du sous menu.
|
||||
- Mise en page du corps des mails de notification.
|
||||
- Paramètres de localisation.
|
||||
- Modification :
|
||||
- Changement de noms de classe :
|
||||
- navLevel1 devient navMain
|
||||
- navLevel2 devient navSub
|
||||
- Mise à jour :
|
||||
- TinyMCE 4.9.11
|
||||
|
||||
|
@ -219,7 +219,8 @@ class helper {
|
||||
'normal' => 'rgba(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . $rgba[3] . ')',
|
||||
'darken' => 'rgba(' . max(0, $rgba[0] - 15) . ',' . max(0, $rgba[1] - 15) . ',' . max(0, $rgba[2] - 15) . ',' . $rgba[3] . ')',
|
||||
'veryDarken' => 'rgba(' . max(0, $rgba[0] - 20) . ',' . max(0, $rgba[1] - 20) . ',' . max(0, $rgba[2] - 20) . ',' . $rgba[3] . ')',
|
||||
'text' => self::relativeLuminanceW3C($rgba) > .22 ? "#222" : "#DDD"
|
||||
'text' => self::relativeLuminanceW3C($rgba) > .22 ? "#222" : "#DDD",
|
||||
'rgb' => 'rgb(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ')'
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -392,12 +392,12 @@ $(document).ready(function(){
|
||||
* Affiche le sous-menu quand il est sticky
|
||||
*/
|
||||
$("nav").mouseenter(function(){
|
||||
$("#navfixedlogout .navLevel2").css({ 'pointer-events' : 'auto' });
|
||||
$("#navfixedconnected .navLevel2").css({ 'pointer-events' : 'auto' });
|
||||
$("#navfixedlogout .navSub").css({ 'pointer-events' : 'auto' });
|
||||
$("#navfixedconnected .navSub").css({ 'pointer-events' : 'auto' });
|
||||
});
|
||||
$("nav").mouseleave(function(){
|
||||
$("#navfixedlogout .navLevel2").css({ 'pointer-events' : 'none' });
|
||||
$("#navfixedconnected .navLevel2").css({ 'pointer-events' : 'none' });
|
||||
$("#navfixedlogout .navSub").css({ 'pointer-events' : 'none' });
|
||||
$("#navfixedconnected .navSub").css({ 'pointer-events' : 'none' });
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -1436,6 +1436,18 @@ class common {
|
||||
$this->setData(['config', 'connect','captcha', true]);
|
||||
$this->setData(['core', 'dataVersion', 10302]);
|
||||
}
|
||||
// Version 10.3.03
|
||||
if ($this->getData(['core', 'dataVersion']) < 10303) {
|
||||
// Activation par défaut du captcha à la connexion
|
||||
$this->setData(['config', 'captchaStrong', false]);
|
||||
$this->setData(['core', 'dataVersion', 10303]);
|
||||
}
|
||||
// Version 10.3.04
|
||||
if ($this->getData(['core', 'dataVersion']) < 10304) {
|
||||
// Couleur des sous menus
|
||||
$this->setData(['theme', 'menu', 'backgroundColorSub', $this->getData(['theme', 'menu', 'backgroundColor']) ]);
|
||||
$this->setData(['core', 'dataVersion', 10304]);
|
||||
}
|
||||
// Version 10.4.00
|
||||
if ($this->getData(['core', 'dataVersion']) < 10400) {
|
||||
// Ajouter le prénom comme pseudo et le pseudo comme signature
|
||||
@ -1481,12 +1493,6 @@ class common {
|
||||
}
|
||||
$this->setData(['core', 'dataVersion', 10400]);
|
||||
}
|
||||
// Version 10.3.03
|
||||
if ($this->getData(['core', 'dataVersion']) < 10303) {
|
||||
// Activation par défaut du captcha à la connexion
|
||||
$this->setData(['config', 'captchaStrong', false]);
|
||||
$this->setData(['core', 'dataVersion', 10303]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1633,7 +1639,7 @@ class core extends common {
|
||||
$css .= 'header span{color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'header', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'header', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'header', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'header', 'textTransform']) . '}';
|
||||
// Menu
|
||||
$colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColor']));
|
||||
$css .= 'nav,nav a{background-color:' . $colors['normal'] . '}';
|
||||
$css .= 'nav,nav.navMain a{background-color:' . $colors['normal'] . '}';
|
||||
$css .= 'nav a,#toggle span,nav a:hover{color:' . $this->getData(['theme', 'menu', 'textColor']) . '}';
|
||||
$css .= 'nav a:hover{background-color:' . $colors['darken'] . '}';
|
||||
$css .= 'nav a.active{color:' . $this->getData(['theme','menu','activeTextColor']) . ';}';
|
||||
@ -1645,8 +1651,11 @@ class core extends common {
|
||||
$css .= 'nav a.active{color:' . $color2['text'] . '}';*/
|
||||
}
|
||||
$css .= 'nav #burgerText{color:' . $colors['text'] . '}';
|
||||
$css .= 'nav .navLevel1 a.active {border-radius:' . $this->getData(['theme', 'menu', 'radius']) . '}';
|
||||
$css .= '#menuLeft{float:' . $this->getData(['theme', 'menu', 'textAlign']) . '}';
|
||||
// Sous menu
|
||||
$colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColorSub']));
|
||||
$css .= 'nav .navSub a{background-color:' . $colors['normal'] . '}';
|
||||
$css .= 'nav .navMain a.active {border-radius:' . $this->getData(['theme', 'menu', 'radius']) . '}';
|
||||
$css .= '#menu{text-align:' . $this->getData(['theme', 'menu', 'textAlign']) . '}';
|
||||
if($this->getData(['theme', 'menu', 'margin'])) {
|
||||
if(
|
||||
$this->getData(['theme', 'menu', 'position']) === 'site-first'
|
||||
@ -1766,7 +1775,9 @@ class core extends common {
|
||||
exit();
|
||||
}
|
||||
// Journalisation
|
||||
$dataLog = strftime('%d/%m/%y',time()) . ';' . strftime('%R',time()) . ';' ;
|
||||
$dataLog = mb_detect_encoding(strftime('%d/%m/%y',time()), 'UTF-8', true)
|
||||
? strftime('%d/%m/%y',time()) . ';' . strftime('%R',time()) . ';'
|
||||
: utf8_encode(strftime('%d/%m/%y',time())) . ';' . utf8_encode(strftime('%R',time())) . ';' ;
|
||||
$dataLog .= helper::getIp() . ';';
|
||||
$dataLog .= $this->getUser('id') ? $this->getUser('id') . ';' : 'anonyme' . ';';
|
||||
$dataLog .= $this->getUrl();
|
||||
@ -2456,7 +2467,7 @@ class layout extends common {
|
||||
empty($childrenPageIds)) {
|
||||
continue;
|
||||
}
|
||||
$itemsLeft .= '<ul class="navLevel2">';
|
||||
$itemsLeft .= '<ul class="navSub">';
|
||||
foreach($childrenPageIds as $childKey) {
|
||||
// Propriétés de l'item
|
||||
$active = ($childKey === $currentPageId) ? 'active ' : '';
|
||||
@ -2530,7 +2541,7 @@ class layout extends common {
|
||||
$itemsRight .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="Me déconnecter">' . template::ico('logout') . '</a></li>';
|
||||
}
|
||||
// Retourne les items du menu
|
||||
echo '<ul class="navLevel1" id="menuLeft">' . $itemsLeft . '</ul><ul class="navLevel1" id="menuRight">' . $itemsRight . '</ul>';
|
||||
echo '<ul class="navMain" id="menuLeft">' . $itemsLeft . '</ul><ul class="navMain" id="menuRight">' . $itemsRight . '</ul>';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2568,7 +2579,7 @@ class layout extends common {
|
||||
continue;
|
||||
}
|
||||
// Propriétés de l'item
|
||||
$active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? 'active ' : '';
|
||||
$active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? ' class="active"' : '';
|
||||
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
|
||||
// Mise en page de l'item;
|
||||
// Ne pas afficher le parent d'une sous-page quand l'option est sélectionnée.
|
||||
@ -2578,7 +2589,7 @@ class layout extends common {
|
||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
|
||||
$items .= '<a href="'.$this->getUrl(1).'">';
|
||||
} else {
|
||||
$items .= '<a href="' . $active . helper::baseUrl() . $parentPageId . '"' . $targetBlank . '>';
|
||||
$items .= '<a href="'. helper::baseUrl() . $parentPageId . '"' . $targetBlank . $active .'>';
|
||||
}
|
||||
$items .= $this->getData(['page', $parentPageId, 'title']);
|
||||
$items .= '</a>';
|
||||
@ -2591,7 +2602,7 @@ class layout extends common {
|
||||
}
|
||||
|
||||
// Propriétés de l'item
|
||||
$active = ($childKey === $currentPageId) ? 'active ' : '';
|
||||
$active = ($childKey === $currentPageId) ? ' class="active"' : '';
|
||||
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
|
||||
// Mise en page du sous-item
|
||||
$itemsChildren .= '<li class="menuSideChild">';
|
||||
@ -2600,7 +2611,7 @@ class layout extends common {
|
||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
|
||||
$itemsChildren .= '<a href="'.$this->getUrl(1).'">';
|
||||
} else {
|
||||
$itemsChildren .= '<a href="' .$active . helper::baseUrl() . $childKey . '"' . $targetBlank . '>';
|
||||
$itemsChildren .= '<a href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . $active . '>';
|
||||
}
|
||||
|
||||
$itemsChildren .= $this->getData(['page', $childKey, 'title']);
|
||||
|
@ -575,6 +575,11 @@ nav li ul li {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/*
|
||||
nav .navSub a{
|
||||
background-color:red !important;
|
||||
}*/
|
||||
|
||||
nav li:hover ul {
|
||||
z-index: 8;
|
||||
opacity: 1;
|
||||
@ -589,12 +594,14 @@ nav a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
nav #menuLeft {
|
||||
|
||||
/* Barre de menu */
|
||||
|
||||
#menuLeft {
|
||||
display: inline-flex;
|
||||
/*float: left;*/
|
||||
}
|
||||
|
||||
nav #menuRight {
|
||||
#menuRight {
|
||||
display: inline-flex ;
|
||||
float: right;
|
||||
}
|
||||
@ -683,8 +690,8 @@ nav::before {
|
||||
position: sticky;
|
||||
}
|
||||
|
||||
#navfixedconnected .navLevel2,
|
||||
#navfixedlogout .navLevel2 {
|
||||
#navfixedconnected .navSub,
|
||||
#navfixedlogout .navSub {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
@ -695,7 +695,9 @@ class config extends common {
|
||||
$d = $this->getData(['blacklist']);
|
||||
$data = '';
|
||||
foreach ($d as $key => $item) {
|
||||
$data .= strftime('%d/%m/%y',$item['lastFail']) . ';' . strftime('%R',$item['lastFail']) . ';' ;
|
||||
$data .= mb_detect_encoding(strftime('%d/%m/%y',$item['lastFail']), 'UTF-8', true)
|
||||
? strftime('%d/%m/%y',$item['lastFail']) . ';' . utf8_encode(strftime('%R',$item['lastFail'])) . ';'
|
||||
: utf8_encode(strftime('%d/%m/%y',$item['lastFail'])) . ';' . utf8_encode(strftime('%R',$item['lastFail'])) . ';' ;
|
||||
$data .= $key . ';' . $item['ip'] . ';' . $item['connectFail'] . PHP_EOL;
|
||||
}
|
||||
file_put_contents($fileName,$data,FILE_APPEND);
|
||||
|
@ -138,6 +138,7 @@ class init extends common {
|
||||
],
|
||||
'menu' => [
|
||||
'backgroundColor' => 'rgba(32, 59, 82, 1)',
|
||||
'backgroundColorSub' => 'rgba(32, 59, 82, 1)',
|
||||
'font' => 'Open+Sans',
|
||||
'fontSize' => '1em',
|
||||
'fontWeight' => 'normal',
|
||||
|
@ -490,6 +490,7 @@ class theme extends common {
|
||||
if($this->isPost()) {
|
||||
$this->setData(['theme', 'menu', [
|
||||
'backgroundColor' => $this->getInput('themeMenuBackgroundColor'),
|
||||
'backgroundColorSub' => $this->getInput('themeMenuBackgroundColorSub'),
|
||||
'font' => $this->getInput('themeMenuFont'),
|
||||
'fontSize' => $this->getInput('themeMenuFontSize'),
|
||||
'fontWeight' => $this->getInput('themeMenuFontWeight'),
|
||||
|
@ -43,7 +43,7 @@ $("input, select").on("change", function() {
|
||||
var css = "@import url('https://fonts.googleapis.com/css?family=" + menuFont + "');";
|
||||
var colors = core.colorVariants($("#themeMenuBackgroundColor").val());
|
||||
// Couleurs du menu
|
||||
css += "nav,nav a{background-color:" + colors.normal + "}";
|
||||
css += "nav,nav.navLevel1 a{background-color:" + colors.normal + "}";
|
||||
css += "nav a,#toggle span,nav a:hover{color:" + $("#themeMenuTextColor").val() + "}";
|
||||
css += "nav a:hover{background-color:" + colors.darken + "}";
|
||||
if ($("#themeMenuActiveColorAuto").is(':checked')) {
|
||||
@ -51,10 +51,13 @@ $("input, select").on("change", function() {
|
||||
} else {
|
||||
css += "nav a:hover{background-color:" + $("#themeMenuActiveColor").val() + ";color:" + $('#themeMenuActiveTextColor').val() + ";}";
|
||||
}
|
||||
// sous menu
|
||||
var colors = core.colorVariants($("#themeMenuBackgroundColorSub").val());
|
||||
css += 'nav .navSub a{background-color:' + colors.normal + '}';
|
||||
// Taille, hauteur, épaisseur et capitalisation de caractères du menu
|
||||
css += "#toggle span,#menu a{padding:" + $("#themeMenuHeight").val() + ";font-family:'" + menuFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeMenuFontWeight").val() + ";font-size:" + $("#themeMenuFontSize").val() + ";text-transform:" + $("#themeMenuTextTransform").val() + "}";
|
||||
// Alignement du menu
|
||||
css += "#menuLeft{float:" + $("#themeMenuTextAlign").val() + "}";
|
||||
css += "#menu{text-align:" + $("#themeMenuTextAlign").val() + "}";
|
||||
// Marge
|
||||
if($("#themeMenuMargin").is(":checked")) {
|
||||
if(
|
||||
|
@ -17,7 +17,7 @@
|
||||
<div class="block">
|
||||
<h4>Couleur</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="col4">
|
||||
<?php echo template::text('themeMenuTextColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
@ -25,7 +25,7 @@
|
||||
'value' => $this->getData(['theme', 'menu', 'textColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="col4">
|
||||
<?php echo template::text('themeMenuBackgroundColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
@ -33,6 +33,14 @@
|
||||
'value' => $this->getData(['theme', 'menu', 'backgroundColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('themeMenuBackgroundColorSub', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Fond du sous-menu',
|
||||
'value' => $this->getData(['theme', 'menu', 'backgroundColorSub'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -466,7 +466,9 @@ class user extends common {
|
||||
$notification = 'Trop de tentatives, accès bloqué durant ' . ($this->getData(['config', 'connect', 'timeout']) / 60) . ' minutes.';
|
||||
}
|
||||
// Journalisation
|
||||
$dataLog = strftime('%d/%m/%y',time()) . ';' . strftime('%R',time()) . ';' ;
|
||||
$dataLog = mb_detect_encoding(strftime('%d/%m/%y',time()), 'UTF-8', true)
|
||||
? strftime('%d/%m/%y',time()) . ';' . strftime('%R',time()) . ';'
|
||||
: utf8_encode(strftime('%d/%m/%y',time())) . ';' . utf8_encode(strftime('%R',time())) . ';' ;
|
||||
$dataLog .= helper::getIp() . ';';
|
||||
$dataLog .= $userId . ';' ;
|
||||
$dataLog .= $this->getUrl() .';' ;
|
||||
|
@ -37,7 +37,6 @@ if(version_compare(PHP_VERSION, '5.6.0', '<')) {
|
||||
date_default_timezone_set('Europe/Paris');
|
||||
setlocale (LC_ALL,'french','fr_Fr','fr_FR.utf8');
|
||||
|
||||
|
||||
/**
|
||||
* Chargement des classes
|
||||
*/
|
||||
|
@ -185,7 +185,9 @@ class blog extends common {
|
||||
]);
|
||||
}
|
||||
self::$comments[] = [
|
||||
strftime('%d %B %Y - %H:%M', $comment['createdOn']),
|
||||
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'])),
|
||||
$comment['content'],
|
||||
$comment['userId'] ? $this->getData(['user', $comment['userId'], 'firstname']) . ' ' . $this->getData(['user', $comment['userId'], 'lastname']) : $comment['author'],
|
||||
$buttonApproval,
|
||||
@ -344,13 +346,17 @@ class blog extends common {
|
||||
$approved = count($this->getData(['module', $this->getUrl(0), $articleIds[$i],'comment']));
|
||||
}
|
||||
// Met en forme le tableau
|
||||
$date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])), 'UTF-8', true)
|
||||
? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn']))
|
||||
: utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])));
|
||||
$heure = mb_detect_encoding(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])), 'UTF-8', true)
|
||||
? strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn']))
|
||||
: utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])));
|
||||
self::$articles[] = [
|
||||
'<a href="' . helper::baseurl() . $this->getUrl(0) . '/' . $articleIds[$i] . '" target="_blank" >' .
|
||||
$this->getData(['module', $this->getUrl(0), $articleIds[$i], 'title']) .
|
||||
'</a>',
|
||||
strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn']))
|
||||
.' à '.
|
||||
strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])),
|
||||
$date .' à '. $heure,
|
||||
self::$states[$this->getData(['module', $this->getUrl(0), $articleIds[$i], 'state'])],
|
||||
// Bouton pour afficher les commentaires de l'article
|
||||
template::button('blogConfigComment' . $articleIds[$i], [
|
||||
|
@ -3,8 +3,14 @@
|
||||
<div class="col10">
|
||||
<div class="blogDate">
|
||||
<i class="far fa-calendar-alt"></i>
|
||||
<?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'])); ?>
|
||||
<?php $date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
|
||||
? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))
|
||||
: utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])));
|
||||
$heure = mb_detect_encoding(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
|
||||
? strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))
|
||||
: utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])));
|
||||
echo $date . ' à ' . $heure;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col2">
|
||||
@ -126,8 +132,10 @@
|
||||
<?php foreach($module::$comments as $commentId => $comment): ?>
|
||||
<div class="block">
|
||||
<h4><?php echo $module::$commentsSignature[$commentId]; ?>
|
||||
le <?php echo strftime('%d %B %Y - %H:%M', $comment['createdOn']); ?>
|
||||
</h4>
|
||||
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; ?>
|
||||
|
@ -37,7 +37,9 @@
|
||||
</div>
|
||||
<div class="blogDate">
|
||||
<i class="far fa-calendar-alt"></i>
|
||||
<?php echo strftime('%d %B %Y', $article['publishedOn']); ?>
|
||||
<?php echo mb_detect_encoding(strftime('%d %B %Y - %H:%M', $article['publishedOn']), 'UTF-8', true)
|
||||
? strftime('%d %B %Y', $article['publishedOn'])
|
||||
: utf8_encode(strftime('%d %B %Y', $article['publishedOn'])); ?>
|
||||
</div>
|
||||
<p class="blogContent">
|
||||
<?php echo helper::subword(strip_tags($article['content']), 0, 400); ?>...
|
||||
|
@ -89,11 +89,15 @@ class news extends common {
|
||||
// News en fonction de la pagination
|
||||
for($i = $pagination['first']; $i < $pagination['last']; $i++) {
|
||||
// Met en forme le tableau
|
||||
$date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])), 'UTF-8', true)
|
||||
? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn']))
|
||||
: utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])));
|
||||
$heure = mb_detect_encoding(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])), 'UTF-8', true)
|
||||
? strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn']))
|
||||
: utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])));
|
||||
self::$news[] = [
|
||||
$this->getData(['module', $this->getUrl(0), $newsIds[$i], 'title']),
|
||||
strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn']))
|
||||
.' à '.
|
||||
strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])),
|
||||
$date .' à '. $heure,
|
||||
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'],
|
||||
|
@ -10,7 +10,9 @@
|
||||
</div>
|
||||
<div class="newsSignature">
|
||||
<i class="far fa-calendar-alt"></i>
|
||||
<?php echo strftime('%d %B %Y', $news['publishedOn']); ?>
|
||||
<?php echo mb_detect_encoding(strftime('%d %B %Y', $news['publishedOn']), 'UTF-8', true)
|
||||
? strftime('%d %B %Y', $news['publishedOn'])
|
||||
: utf8_encode(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>
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 7.9 KiB |
Loading…
Reference in New Issue
Block a user