Blog 6.8
This commit is contained in:
parent
5b82100c30
commit
3b77620511
@ -16,7 +16,7 @@
|
||||
class blog extends common
|
||||
{
|
||||
|
||||
const VERSION = '6.7';
|
||||
const VERSION = '6.8';
|
||||
const REALNAME = 'Blog';
|
||||
const DELETE = true;
|
||||
const UPDATE = '0.0';
|
||||
@ -565,7 +565,7 @@ class blog extends common
|
||||
'feeds' => $this->getInput('blogOptionShowFeeds', helper::FILTER_BOOLEAN),
|
||||
'feedsLabel' => $this->getInput('blogOptionFeedslabel', helper::FILTER_STRING_SHORT),
|
||||
'layout' => $this->getInput('blogOptionArticlesLayout', helper::FILTER_BOOLEAN),
|
||||
'articlesLenght' => $this->getInput('blogOptionArticlesLayout', helper::FILTER_BOOLEAN) === false ? $this->getInput('blogOptionArticlesLenght', helper::FILTER_INT): 0,
|
||||
'articlesLenght' => $this->getInput('blogOptionArticlesLayout', helper::FILTER_BOOLEAN) === false ? $this->getInput('blogOptionArticlesLenght', helper::FILTER_INT) : 0,
|
||||
'itemsperPage' => $this->getInput('blogOptionItemsperPage', helper::FILTER_INT, true),
|
||||
'dateFormat' => $this->getInput('blogOptionDateFormat'),
|
||||
'timeFormat' => $this->getInput('blogOptionTimeFormat'),
|
||||
@ -863,10 +863,13 @@ class blog extends common
|
||||
if ($articlePublishedOn <= time() and $articleIdsStates[$articleId]) {
|
||||
$articleIds[] = $articleId;
|
||||
// Nombre de commentaires approuvés par article
|
||||
self::$comments[$articleId] = 0 ;
|
||||
if (is_array($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'comment']))) {
|
||||
self::$comments[$articleId] = count($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'comment']));
|
||||
} else {
|
||||
self::$comments[$articleId] = '0';
|
||||
foreach ($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'comment']) as $commentId => $commentValue) {
|
||||
if ($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'comment', $commentId, 'approval'])) {
|
||||
self::$comments[$articleId] = self::$comments[$articleId] + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
|
||||
# version 6.8
|
||||
- Erreur de décompte des commentaires approuvés ou non dans l'index
|
||||
# version 6.7
|
||||
- Ancre article qui affiche le début de l'article au clic sur la barre de pages, fonction utile lorsque le module est sous la page
|
||||
# version 6.6
|
||||
|
@ -1 +1 @@
|
||||
{"name":"blog","realName":"Blog","version":"6.5","update":"0.0","delete":true,"dataDirectory":""}
|
||||
{"name":"blog","realName":"Blog","version":"6.8","update":"0.0","delete":true,"dataDirectory":""}
|
@ -133,11 +133,11 @@
|
||||
</h2>
|
||||
<div class="blogComment">
|
||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>#comment">
|
||||
<?php if ($article['comment']): ?>
|
||||
<?php echo count($article['comment']); ?>
|
||||
<?php if ($module::$comments[$articleId]): ?>
|
||||
<?php echo $module::$comments[$articleId]; ?>
|
||||
<?php echo template::ico('comment', ['margin' => 'left']); ?>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<?php echo template::ico('comment', ['margin' => 'left']); ?>
|
||||
</div>
|
||||
<div class="blogDate">
|
||||
<!-- bloc signature et date -->
|
||||
|
Loading…
Reference in New Issue
Block a user