modif options d'activation

This commit is contained in:
Fred Tempez 2020-11-17 10:31:08 +01:00
parent 8023df17e6
commit f987aecbff
5 changed files with 30 additions and 38 deletions

View File

@ -31,10 +31,6 @@ class blog extends common {
public static $pages;
public static $rssUrl;
public static $rssLabel;
public static $states = [
false => 'Brouillon',
true => 'Publié'
@ -476,8 +472,6 @@ class blog extends common {
for($i = $pagination['first']; $i < $pagination['last']; $i++) {
self::$comments[$commentIds[$i]] = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment', $commentIds[$i]]);
}
self::$rssUrl = helper::baseUrl() . $this->getUrl(0) . '/rss';
self::$rssLabel = $this->getData(['module', $this->getUrl(0), 'config','feedsLabel']);
// Valeurs en sortie
$this->addOutput([
'showBarEditButton' => true,
@ -506,8 +500,6 @@ class blog extends common {
for($i = $pagination['first']; $i < $pagination['last']; $i++) {
self::$articles[$articleIds[$i]] = $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i]]);
}
self::$rssUrl = helper::baseUrl() . $this->getUrl(0) . '/rss';
self::$rssLabel = $this->getData(['module', $this->getUrl(0), 'config','feedsLabel']);
// Valeurs en sortie
$this->addOutput([
'showBarEditButton' => true,

View File

@ -39,14 +39,16 @@
</p>
<?php echo template::formClose(); ?>
<!-- Bloc RSS-->
<?php if ($this->getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
<div id="rssFeed">
<a type="application/rss+xml" href="<?php echo $module::$rssUrl ?> ">
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?> ">
<img src='module/news/ressource/feed-icon-16.gif' />
<?php
echo '<p>' . $module::$rssLabel . '</p>' ;
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
?>
</a>
</div>
<?php endif; ?>
<?php if($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'closeComment'])): ?>
<p>Cet article ne reçoit pas de commentaire.</p>
<?php else: ?>

View File

@ -48,14 +48,16 @@
</div>
</div>
<?php echo $module::$pages; ?>
<?php if ($this->getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
<div id="rssFeed">
<a type="application/rss+xml" href="<?php echo $module::$rssUrl ?> ">
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?> ">
<img src='module/news/ressource/feed-icon-16.gif' />
<?php
echo '<p>' . $module::$rssLabel . '</p>' ;
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
?>
</a>
</div>
<?php endif; ?>
<?php else: ?>
<?php echo template::speech('Aucun article.'); ?>
<?php endif; ?>

View File

@ -29,10 +29,6 @@ class news extends common {
public static $pages;
public static $rssUrl;
public static $rssLabel;
public static $states = [
false => 'Brouillon',
true => 'Publié'
@ -299,8 +295,6 @@ class news extends common {
for($i = $pagination['first']; $i < $pagination['last']; $i++) {
self::$news[$newsIds[$i]] = $this->getData(['module', $this->getUrl(0),'posts', $newsIds[$i]]);
}
self::$rssUrl = helper::baseUrl() . $this->getUrl(0) . '/rss';
self::$rssLabel = $this->getData(['module', $this->getUrl(0), 'config','feedsLabel']);
// Valeurs en sortie
$this->addOutput([
'showBarEditButton' => true,

View File

@ -21,14 +21,16 @@
</div>
</div>
<?php echo $module::$pages; ?>
<?php if ($this->getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
<div id="rssFeed">
<a type="application/rss+xml" href="<?php echo $module::$rssUrl ?> ">
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?> ">
<img src='module/news/ressource/feed-icon-16.gif' />
<?php
echo '<p>' . $module::$rssLabel . '</p>' ;
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
?>
</a>
</div>
<?php endif; ?>
<?php else: ?>
<?php echo template::speech('Aucune news.'); ?>
<?php endif; ?>