forked from ZwiiCMS-Team/ZwiiCMS
modules blog et download WIP
This commit is contained in:
parent
3a80515b17
commit
154278ef98
@ -812,7 +812,7 @@ class common {
|
|||||||
$sitemap->updateRobots();
|
$sitemap->updateRobots();
|
||||||
|
|
||||||
// Submit your sitemaps to Google, Yahoo, Bing and Ask.com
|
// Submit your sitemaps to Google, Yahoo, Bing and Ask.com
|
||||||
$sitemap->submitSitemap();
|
//$sitemap->submitSitemap();
|
||||||
|
|
||||||
return(file_exists('sitemap.xml'));
|
return(file_exists('sitemap.xml'));
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
font-size:0.8em;
|
font-size:0.8em;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
color: grey;
|
color: grey;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
.blogArticlePicture {
|
.blogArticlePicture {
|
||||||
|
@ -1,66 +1,73 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col10">
|
<div class="col12">
|
||||||
<div class="blogDate">
|
<?php $pictureSize = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']); ?>
|
||||||
<i class="far fa-calendar-alt"></i>
|
<?php if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'hidePicture']) == false) {
|
||||||
<?php $date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
|
echo '<img class="blogArticlePicture blogArticlePicture' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picturePosition']) .
|
||||||
? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))
|
' pict' . $pictureSize . '" src="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) .
|
||||||
: utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])));
|
'" alt="' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) . '">';
|
||||||
$heure = mb_detect_encoding(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
|
} ?>
|
||||||
? strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))
|
<?php echo $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(1), 'content']); ?>
|
||||||
: utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])));
|
|
||||||
echo $date . ' à ' . $heure;
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col2">
|
</div>
|
||||||
|
<div class="row verticalAlignMiddle">
|
||||||
|
<div class="col11 blogDate">
|
||||||
|
<!-- bloc signature et date -->
|
||||||
|
<?php echo $module::$articleSignature . ' - ';?>
|
||||||
|
<i class="far fa-calendar-alt"></i>
|
||||||
|
<?php $date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
|
||||||
|
? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))
|
||||||
|
: utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])));
|
||||||
|
$heure = mb_detect_encoding(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
|
||||||
|
? strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))
|
||||||
|
: utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])));
|
||||||
|
echo $date . ' à ' . $heure;
|
||||||
|
?>
|
||||||
|
<!-- Bloc RSS-->
|
||||||
|
<?php if ($this->getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
|
||||||
|
<div id="rssFeed">
|
||||||
|
<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>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
|
||||||
|
?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="col1">
|
||||||
<?php if (
|
<?php if (
|
||||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
|
||||||
AND
|
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||||
( // Propriétaire
|
AND
|
||||||
(
|
( // Propriétaire
|
||||||
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === $module::EDIT_OWNER
|
(
|
||||||
AND ( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'userId']) === $this->getUser('id')
|
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === $module::EDIT_OWNER
|
||||||
OR $this->getUser('group') === self::GROUP_ADMIN )
|
AND ( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'userId']) === $this->getUser('id')
|
||||||
|
OR $this->getUser('group') === self::GROUP_ADMIN )
|
||||||
|
)
|
||||||
|
OR (
|
||||||
|
// Groupe
|
||||||
|
( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === self::GROUP_ADMIN
|
||||||
|
OR $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === self::GROUP_MODERATOR)
|
||||||
|
AND $this->getUser('group') >= $this->getData(['module',$this->getUrl(0), 'posts', $this->getUrl(1),'editConsent'])
|
||||||
|
)
|
||||||
|
OR (
|
||||||
|
// Tout le monde
|
||||||
|
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === $module::EDIT_ALL
|
||||||
|
AND $this->getUser('group') >= $module::$actions['config']
|
||||||
)
|
)
|
||||||
OR (
|
)
|
||||||
// Groupe
|
): ?>
|
||||||
( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === self::GROUP_ADMIN
|
<a href ="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'];?>">
|
||||||
OR $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === self::GROUP_MODERATOR)
|
<?php echo template::ico('pencil');?>
|
||||||
AND $this->getUser('group') >= $this->getData(['module',$this->getUrl(0), 'posts', $this->getUrl(1),'editConsent'])
|
</a>
|
||||||
)
|
|
||||||
OR (
|
|
||||||
// Tout le monde
|
|
||||||
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === $module::EDIT_ALL
|
|
||||||
AND $this->getUser('group') >= $module::$actions['config']
|
|
||||||
)
|
|
||||||
)
|
|
||||||
): ?>
|
|
||||||
<?php echo template::button('blogEdit', [
|
<?php echo template::button('blogEdit', [
|
||||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'],
|
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'],
|
||||||
'value' => 'Editer'
|
'value' => template::ico('pencil')
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php $pictureSize = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']); ?>
|
|
||||||
<?php if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'hidePicture']) == false) {
|
|
||||||
echo '<img class="blogArticlePicture blogArticlePicture' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picturePosition']) .
|
|
||||||
' pict' . $pictureSize . '" src="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) .
|
|
||||||
'" alt="' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) . '">';
|
|
||||||
} ?>
|
|
||||||
<?php echo $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(1), 'content']); ?>
|
|
||||||
<p class="clearBoth signature"><?php echo $module::$articleSignature;?></p>
|
|
||||||
<!-- Bloc RSS-->
|
|
||||||
<?php if ($this->getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
|
|
||||||
<div id="rssFeed">
|
|
||||||
<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>' . $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), 'commentClose'])): ?>
|
<?php if($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentClose'])): ?>
|
||||||
<p>Cet article ne reçoit pas de commentaire.</p>
|
<p>Cet article ne reçoit pas de commentaire.</p>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
<div class="col11 downloadDate">
|
<div class="col11 downloadDate">
|
||||||
<?php echo $module::$itemSignature . ' - ';?>
|
<?php echo $module::$itemSignature . ' - ';?>
|
||||||
<i class="far fa-calendar-alt"></i>
|
<i class="far fa-calendar-alt"></i>
|
||||||
|
|
||||||
<?php $date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
|
<?php $date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
|
||||||
? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn']))
|
? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn']))
|
||||||
: utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])));
|
: utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])));
|
||||||
@ -18,9 +17,20 @@
|
|||||||
: utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])));
|
: utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])));
|
||||||
echo $date . ' à ' . $heure;
|
echo $date . ' à ' . $heure;
|
||||||
?>
|
?>
|
||||||
|
<!-- Bloc RSS-->
|
||||||
|
<?php if ($this->getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
|
||||||
|
<div id="rssFeed">
|
||||||
|
<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>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
|
||||||
|
?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
<!-- Bouton d'édition -->
|
<!-- Bouton d'édition -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col1 verticalAlignMiddle">
|
<div class="col1">
|
||||||
<?php if (
|
<?php if (
|
||||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||||
AND
|
AND
|
||||||
@ -50,19 +60,6 @@
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Bloc RSS-->
|
|
||||||
<div class="row">
|
|
||||||
<div class="col12 rssFeed">
|
|
||||||
<?php if ($this->getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
|
|
||||||
<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>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
|
|
||||||
?>
|
|
||||||
</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user