news 6 option show pseudo

This commit is contained in:
Fred Tempez 2024-10-15 15:19:38 +02:00
parent 341e002ef2
commit c0e6781dda
5 changed files with 29 additions and 12 deletions

View File

@ -1,5 +1,5 @@
# Versions 6.0 # Versions 6.0
- Ajoute deux nouvelles options pour afficher ou masquer la date et l'heure de l'article. - Ajoute trois nouvelles options pour afficher ou masquer la signature, la date et l'heure de l'article.
- Corrige un mauvais format de la propriété buttonBack non stockée au type booléen. - Corrige un mauvais format de la propriété buttonBack non stockée au type booléen.
# Versions 5.9 # Versions 5.9
- Largeur d'un bouton de retour. - Largeur d'un bouton de retour.

View File

@ -317,6 +317,7 @@ class news extends common
'buttonBack' => $this->getInput('newsOptionButtonBack', helper::FILTER_BOOLEAN), 'buttonBack' => $this->getInput('newsOptionButtonBack', helper::FILTER_BOOLEAN),
'showDate' => $this->getInput('newsOptionShowDate', helper::FILTER_BOOLEAN), 'showDate' => $this->getInput('newsOptionShowDate', helper::FILTER_BOOLEAN),
'showTime' => $this->getInput('newsOptionShowTime', helper::FILTER_BOOLEAN), 'showTime' => $this->getInput('newsOptionShowTime', helper::FILTER_BOOLEAN),
'showPseudo' => $this->getInput('newsOptionShowPseudo', helper::FILTER_BOOLEAN),
'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']), 'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']),
] ]
]); ]);
@ -623,6 +624,7 @@ class news extends common
$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', 'showTime', true]); $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', 'showDate', true]);
$this->setData(['module', $this->getUrl(0), 'config', 'showPseudo', true]);
// Mettre à jour la version // Mettre à jour la version
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '6.0']); $this->setData(['module', $this->getUrl(0), 'config', 'versionData', '6.0']);
} }

View File

@ -13,8 +13,12 @@
</div> </div>
<div class="col6 newsDate textAlignRight"> <div class="col6 newsDate textAlignRight">
<!-- bloc signature --> <!-- bloc signature -->
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showPseudo']) === true
): ?>
<?php echo template::ico('user'); ?> <?php echo template::ico('user'); ?>
<?php echo $module::$articleSignature; ?> <?php echo $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId'])); ?>
<?php endif; ?>
<!-- bloc date --> <!-- bloc date -->
<?php if ( <?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true $this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true

View File

@ -22,8 +22,12 @@
</h2> </h2>
<div class="newsSignature"> <div class="newsSignature">
<!-- bloc signature --> <!-- bloc signature -->
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showPseudo']) === true
): ?>
<?php echo template::ico('user'); ?> <?php echo template::ico('user'); ?>
<?php echo $news['userId']; ?> <?php echo $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'userId'])); ?>
<?php endif; ?>
<!-- bloc Date --> <!-- bloc Date -->
<?php if ( <?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true $this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true

View File

@ -15,6 +15,18 @@
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Paramètres'); ?></h4> <h4><?php echo helper::translate('Paramètres'); ?></h4>
<div class="row">
<div class="col6">
<?php echo template::checkbox('newsOptionButtonBack', true, 'Bouton de retour', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('newsOptionShowPseudo', true, 'Signature', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'showPseudo'])
]); ?>
</div>
</div>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::checkbox('newsOptionShowDate', true, 'Afficher la date', [ <?php echo template::checkbox('newsOptionShowDate', true, 'Afficher la date', [
@ -60,12 +72,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col3"> <div class="col6">
<?php echo template::checkbox('newsOptionButtonBack', true, 'Bouton de retour', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('newsOptionShowFeeds', true, 'Lien du flux RSS', [ <?php echo template::checkbox('newsOptionShowFeeds', true, 'Lien du flux RSS', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'feeds']), 'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
'help' => 'Flux limité aux articles de la première page.' 'help' => 'Flux limité aux articles de la première page.'