Blog 8.00 ajoute les options d'affichage de la date et de l'heure
This commit is contained in:
parent
82b55210d8
commit
0abb336850
@ -16,7 +16,7 @@
|
|||||||
class blog extends common
|
class blog extends common
|
||||||
{
|
{
|
||||||
|
|
||||||
const VERSION = '7.12';
|
const VERSION = '8.0';
|
||||||
const REALNAME = 'Blog';
|
const REALNAME = 'Blog';
|
||||||
const DELETE = true;
|
const DELETE = true;
|
||||||
const UPDATE = '0.0';
|
const UPDATE = '0.0';
|
||||||
@ -174,10 +174,12 @@ class blog extends common
|
|||||||
$this->setData(['module', $this->getUrl(0), 'config', 'timeFormat', '%H:%M']);
|
$this->setData(['module', $this->getUrl(0), 'config', 'timeFormat', '%H:%M']);
|
||||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '6.5']);
|
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '6.5']);
|
||||||
}
|
}
|
||||||
// Version 7.4
|
// Version 8.0
|
||||||
if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '7.4', '<')) {
|
if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '8.0', '<')) {
|
||||||
$this->setData(['module', $this->getUrl(0), 'config', 'buttonBack', true]);
|
$this->setData(['module', $this->getUrl(0), 'config', 'buttonBack', true]);
|
||||||
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '7.4']);
|
$this->setData(['module', $this->getUrl(0), 'config', 'showTime', true]);
|
||||||
|
$this->setData(['module', $this->getUrl(0), 'config', 'showDate', true]);
|
||||||
|
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '8.0']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -578,7 +580,9 @@ class blog extends common
|
|||||||
'itemsperPage' => $this->getInput('blogOptionItemsperPage', helper::FILTER_INT, true),
|
'itemsperPage' => $this->getInput('blogOptionItemsperPage', helper::FILTER_INT, true),
|
||||||
'dateFormat' => $this->getInput('blogOptionDateFormat'),
|
'dateFormat' => $this->getInput('blogOptionDateFormat'),
|
||||||
'timeFormat' => $this->getInput('blogOptionTimeFormat'),
|
'timeFormat' => $this->getInput('blogOptionTimeFormat'),
|
||||||
'buttonBack' => $this->getInput('newsOptionButtonBack'),
|
'buttonBack' => $this->getInput('blogOptionButtonBack', helper::FILTER_BOOLEAN),
|
||||||
|
'showDate' => $this->getInput('blogOptionShowDate', helper::FILTER_BOOLEAN),
|
||||||
|
'showTime' => $this->getInput('blogOptionShowTime', helper::FILTER_BOOLEAN),
|
||||||
'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']),
|
'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']),
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
@ -596,7 +600,6 @@ class blog extends common
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Suppression
|
* Suppression
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
# Version 7.12
|
# Version 8.00
|
||||||
|
- Ajoute deux nouvelles options pour afficher ou masquer la date et l'heure de l'article.
|
||||||
- Corrige un bug d'affichage des articles lorsque le thème Moderne est sélectionné.
|
- Corrige un bug d'affichage des articles lorsque le thème Moderne est sélectionné.
|
||||||
|
- Corrige un bug dans la méthode de tronquage de l'article, nécessite Zwii 13.5
|
||||||
|
- Corrige un mauvais format de la propriété buttonBack non stockée au type booléen.
|
||||||
# Version 7.11
|
# Version 7.11
|
||||||
- Le sélecteur de fichier affiche par défaut le chemin vers le fichier présent dans le champ.
|
- Le sélecteur de fichier affiche par défaut le chemin vers le fichier présent dans le champ.
|
||||||
# Version 7.10
|
# Version 7.10
|
||||||
|
@ -18,11 +18,28 @@
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col6 newsDate textAlignRight">
|
<div class="col6 newsDate textAlignRight">
|
||||||
<!-- bloc signature et date -->
|
<!-- bloc signature -->
|
||||||
<?php echo template::ico('user'); ?>
|
<?php echo template::ico('user'); ?>
|
||||||
<?php echo $module::$articleSignature; ?>
|
<?php echo $module::$articleSignature; ?>
|
||||||
<?php echo template::ico('calendar-empty'); ?>
|
<!-- bloc date -->
|
||||||
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI) . ' ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
|
<?php if (
|
||||||
|
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
|
||||||
|
|| $this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true
|
||||||
|
): ?>
|
||||||
|
<?php echo template::ico('calendar-empty', ['margin' => 'left']); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
|
||||||
|
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (
|
||||||
|
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
|
||||||
|
&& $this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true
|
||||||
|
): ?>
|
||||||
|
<?php echo ' - '; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
|
||||||
|
<?php echo helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
|
||||||
|
<?php endif; ?>
|
||||||
<!-- Bloc edition -->
|
<!-- Bloc edition -->
|
||||||
<?php if (
|
<?php if (
|
||||||
$this->isConnected() === true
|
$this->isConnected() === true
|
||||||
|
@ -24,11 +24,28 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6 blogEdit">
|
<div class="col6 blogEdit">
|
||||||
<!-- bloc signature et date -->
|
<!-- bloc signature -->
|
||||||
<?php echo template::ico('user'); ?>
|
<?php echo template::ico('user'); ?>
|
||||||
<?php echo $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId'])); ?>
|
<?php echo $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId'])); ?>
|
||||||
<?php echo template::ico('calendar-empty'); ?>
|
<!-- bloc Date -->
|
||||||
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI) . ' ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
|
<?php if (
|
||||||
|
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
|
||||||
|
|| $this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true
|
||||||
|
): ?>
|
||||||
|
<?php echo template::ico('calendar-empty', ['margin' => 'left']); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
|
||||||
|
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (
|
||||||
|
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
|
||||||
|
&& $this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true
|
||||||
|
): ?>
|
||||||
|
<?php echo ' - '; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
|
||||||
|
<?php echo helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -139,27 +156,44 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="blogDate">
|
<div class="blogDate">
|
||||||
<!-- bloc signature et date -->
|
<!-- bloc signature -->
|
||||||
<?php echo template::ico('user'); ?>
|
<?php echo template::ico('user'); ?>
|
||||||
<?php echo $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId'])); ?>
|
<?php echo $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId'])); ?>
|
||||||
<?php echo template::ico('calendar-empty'); ?>
|
<!-- bloc date -->
|
||||||
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI) . ' ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
|
<?php if (
|
||||||
</div>
|
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
|
||||||
<div class="blogContent">
|
|| $this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true
|
||||||
<?php $lenght = $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']); ?>
|
): ?>
|
||||||
<?php if ($lenght > 0): ?>
|
<?php echo template::ico('calendar-empty', ['margin' => 'left']); ?>
|
||||||
<?php ?>
|
|
||||||
<?php echo helper::subword($article['content'], 0, $lenght); ?>...
|
|
||||||
<div class="readMoreContainer">
|
|
||||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">
|
|
||||||
<button class="readMoreButton">
|
|
||||||
<?php echo helper::translate('Lire la suite'); ?>
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<?php else: ?>
|
|
||||||
<?php echo $article['content']; ?>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
|
||||||
|
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (
|
||||||
|
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
|
||||||
|
&& $this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true
|
||||||
|
): ?>
|
||||||
|
<?php echo ' - '; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
|
||||||
|
<?php echo helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div class="blogContent">
|
||||||
|
<?php $lenght = $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']); ?>
|
||||||
|
<?php if ($lenght > 0): ?>
|
||||||
|
<?php ?>
|
||||||
|
<?php echo helper::subword($article['content'], 0, $lenght); ?>...
|
||||||
|
<div class="readMoreContainer">
|
||||||
|
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">
|
||||||
|
<button class="readMoreButton">
|
||||||
|
<?php echo helper::translate('Lire la suite'); ?>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php else: ?>
|
||||||
|
<?php echo $article['content']; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,30 +19,22 @@
|
|||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('blogOptionArticlesLayout', $module::$articlesLayout, [
|
<?php echo template::checkbox('blogOptionShowDate', true, 'Afficher la date', [
|
||||||
'label' => 'Disposition',
|
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'showDate']),
|
||||||
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'layout'])
|
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('blogOptionArticlesLenght', $module::$articlesLenght, [
|
|
||||||
'label' => 'Aperçus',
|
|
||||||
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght'])
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col2">
|
|
||||||
<?php echo template::select('blogOptionItemsperPage', $module::$ArticlesListed, [
|
|
||||||
'label' => 'Articles par page',
|
|
||||||
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage'])
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col2">
|
|
||||||
<?php echo template::select('blogOptionDateFormat', $module::$dateFormats, [
|
<?php echo template::select('blogOptionDateFormat', $module::$dateFormats, [
|
||||||
'label' => 'Format des dates',
|
'label' => 'Format des dates',
|
||||||
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'dateFormat'])
|
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'dateFormat'])
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col2">
|
<div class="col3">
|
||||||
|
<?php echo template::checkbox('blogOptionShowTime', true, 'Afficher l\'heure', [
|
||||||
|
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'showTime']),
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col3">
|
||||||
<?php echo template::select('blogOptionTimeFormat', $module::$timeFormats, [
|
<?php echo template::select('blogOptionTimeFormat', $module::$timeFormats, [
|
||||||
'label' => 'Format des heures',
|
'label' => 'Format des heures',
|
||||||
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'timeFormat'])
|
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'timeFormat'])
|
||||||
@ -50,19 +42,39 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col4">
|
||||||
|
<?php echo template::select('blogOptionArticlesLayout', $module::$articlesLayout, [
|
||||||
|
'label' => 'Disposition',
|
||||||
|
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'layout'])
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col4">
|
||||||
|
<?php echo template::select('blogOptionArticlesLenght', $module::$articlesLenght, [
|
||||||
|
'label' => 'Aperçus',
|
||||||
|
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght'])
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col4">
|
||||||
|
<?php echo template::select('blogOptionItemsperPage', $module::$ArticlesListed, [
|
||||||
|
'label' => 'Articles par page',
|
||||||
|
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage'])
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col3">
|
||||||
|
<?php echo template::checkbox('newsOptionButtonBack', true, 'Bouton de retour', [
|
||||||
|
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::checkbox('blogOptionShowFeeds', true, 'Lien du flux RSS', [
|
<?php echo template::checkbox('blogOptionShowFeeds', true, 'Lien du flux RSS', [
|
||||||
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
|
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col3">
|
|
||||||
<?php echo template::checkbox('newsOptionButtonBack', true, 'Bouton de retour', [
|
|
||||||
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::text('blogOptionFeedslabel', [
|
<?php echo template::text('blogOptionFeedslabel', [
|
||||||
'label' => 'Texte de l\'étiquette',
|
'label' => 'Texte de l\'étiquette RSS',
|
||||||
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel'])
|
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel'])
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user