Merge branch '10603' into install_update
This commit is contained in:
commit
ff0c9e680f
@ -1,6 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## version 10.6.03
|
## version 10.6.03
|
||||||
|
|
||||||
|
- Correction :
|
||||||
|
- Module actualités (news), version 3.3, le flux RSS affiche l'ensemble des articles plutôt que ceux de la page courante.
|
||||||
- Modification :
|
- Modification :
|
||||||
- Livraison des fichiers de thème lors d'une primo installation avec site de test dans une archive. Désormais, le dossier site ne contiendra que les fichiers de sécurité htaccess. Cette procédure permettra de ne plus différencier les archives d'installation et de mise à jour.
|
- Livraison des fichiers de thème lors d'une primo installation avec site de test dans une archive. Désormais, le dossier site ne contiendra que les fichiers de sécurité htaccess. Cette procédure permettra de ne plus différencier les archives d'installation et de mise à jour.
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class common {
|
|||||||
|
|
||||||
// Numéro de version
|
// Numéro de version
|
||||||
const ZWII_VERSION = '10.6.03';
|
const ZWII_VERSION = '10.6.03';
|
||||||
const ZWII_UPDATE_CHANNEL = 'v10';
|
const ZWII_UPDATE_CHANNEL = "v10";
|
||||||
|
|
||||||
public static $actions = [];
|
public static $actions = [];
|
||||||
public static $coreModuleIds = [
|
public static $coreModuleIds = [
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
class blog extends common {
|
class blog extends common {
|
||||||
|
|
||||||
const VERSION = '5.0';
|
const VERSION = '5.1';
|
||||||
const REALNAME = 'Blog';
|
const REALNAME = 'Blog';
|
||||||
const DELETE = true;
|
const DELETE = true;
|
||||||
const UPDATE = '0.0';
|
const UPDATE = '0.0';
|
||||||
@ -142,8 +142,8 @@ class blog extends common {
|
|||||||
// Corps des articles
|
// Corps des articles
|
||||||
$articleIdsPublishedOns = helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'publishedOn', 'SORT_DESC');
|
$articleIdsPublishedOns = helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'publishedOn', 'SORT_DESC');
|
||||||
$articleIdsStates = helper::arrayCollumn($this->getData(['module', $this->getUrl(0),'posts']), 'state', 'SORT_DESC');
|
$articleIdsStates = helper::arrayCollumn($this->getData(['module', $this->getUrl(0),'posts']), 'state', 'SORT_DESC');
|
||||||
foreach($articleIdsPublishedOns as $articleId => $articlePublishedOn) {
|
foreach( $articleIdsPublishedOns as $articleId => $articlePublishedOn ) {
|
||||||
if($articlePublishedOn <= time() AND $articleIdsStates[$articleId]) {
|
if( $articlePublishedOn <= time() AND $articleIdsStates[$articleId] ) {
|
||||||
// Miniature
|
// Miniature
|
||||||
$parts = explode('/',$this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'picture']));
|
$parts = explode('/',$this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'picture']));
|
||||||
$thumb = str_replace ($parts[(count($parts)-1)],'mini_' . $parts[(count($parts)-1)], $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'picture']));
|
$thumb = str_replace ($parts[(count($parts)-1)],'mini_' . $parts[(count($parts)-1)], $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'picture']));
|
||||||
@ -163,11 +163,13 @@ class blog extends common {
|
|||||||
$newsArticle->setAuthor($author,'no@mail.com');
|
$newsArticle->setAuthor($author,'no@mail.com');
|
||||||
$newsArticle->setId(helper::baseUrl() .$this->getUrl(0) . '/' . $articleId);
|
$newsArticle->setId(helper::baseUrl() .$this->getUrl(0) . '/' . $articleId);
|
||||||
$newsArticle->setDate(date('r', $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn'])));
|
$newsArticle->setDate(date('r', $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn'])));
|
||||||
$imageData = getimagesize(helper::baseUrl(false) . self::FILE_DIR . 'thumb/' . $thumb);
|
if ( file_exists($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'picture'])) ) {
|
||||||
|
$imageData = getimagesize(helper::baseUrl(false) . self::FILE_DIR . 'thumb/' . $thumb);
|
||||||
$newsArticle->addEnclosure( helper::baseUrl(false) . self::FILE_DIR . 'thumb/' . $thumb,
|
$newsArticle->addEnclosure( helper::baseUrl(false) . self::FILE_DIR . 'thumb/' . $thumb,
|
||||||
$imageData[0] * $imageData[1],
|
$imageData[0] * $imageData[1],
|
||||||
$imageData['mime']
|
$imageData['mime']
|
||||||
);
|
);
|
||||||
|
}
|
||||||
$feeds->addItem($newsArticle);
|
$feeds->addItem($newsArticle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,21 +4,21 @@
|
|||||||
<?php foreach($module::$articles as $articleId => $article): ?>
|
<?php foreach($module::$articles as $articleId => $article): ?>
|
||||||
<div class="row rowArticle">
|
<div class="row rowArticle">
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php
|
<?php if ( file_exists(self::FILE_DIR . 'source/' . $article['picture']) ): ?>
|
||||||
// Déterminer le nom de la miniature
|
<?php // Déterminer le nom de la miniature
|
||||||
$parts = explode('/',$article['picture']);
|
$parts = explode('/',$article['picture']);
|
||||||
$thumb = str_replace ($parts[(count($parts)-1)],'mini_' . $parts[(count($parts)-1)], $article['picture']);
|
$thumb = str_replace ($parts[(count($parts)-1)],'mini_' . $parts[(count($parts)-1)], $article['picture']);
|
||||||
// Créer la miniature si manquante
|
// Créer la miniature si manquante
|
||||||
if (!file_exists( self::FILE_DIR . 'thumb/' . $thumb) ) {
|
if (!file_exists( self::FILE_DIR . 'thumb/' . $thumb) ) {
|
||||||
$this->makeThumb( self::FILE_DIR . 'source/' . $article['picture'],
|
$this->makeThumb( self::FILE_DIR . 'source/' . $article['picture'],
|
||||||
self::FILE_DIR . 'thumb/' . $thumb,
|
self::FILE_DIR . 'thumb/' . $thumb,
|
||||||
self::THUMBS_WIDTH);
|
self::THUMBS_WIDTH);
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
?>
|
|
||||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>" class="blogPicture">
|
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>" class="blogPicture">
|
||||||
<img src="<?php echo helper::baseUrl(false) . self::FILE_DIR . 'thumb/' . $thumb; ?>" alt="<?php echo $article['picture']; ?>">
|
<img src="<?php echo helper::baseUrl(false) . self::FILE_DIR . 'thumb/' . $thumb; ?>" alt="<?php echo $article['picture']; ?>">
|
||||||
</a>
|
</a>
|
||||||
|
<?php endif;?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col9">
|
<div class="col9">
|
||||||
<h1 class="blogTitle">
|
<h1 class="blogTitle">
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
class news extends common {
|
class news extends common {
|
||||||
|
|
||||||
const VERSION = '3.2';
|
const VERSION = '3.3';
|
||||||
const REALNAME = 'Actualités';
|
const REALNAME = 'Actualités';
|
||||||
const DELETE = true;
|
const DELETE = true;
|
||||||
const UPDATE = '0.0';
|
const UPDATE = '0.0';
|
||||||
@ -101,8 +101,6 @@ class news extends common {
|
|||||||
$feeds->addGenerator();
|
$feeds->addGenerator();
|
||||||
// Corps des articles
|
// Corps des articles
|
||||||
$newsIdsPublishedOns = helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'publishedOn', 'SORT_DESC');
|
$newsIdsPublishedOns = helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'publishedOn', 'SORT_DESC');
|
||||||
// Articles de la première page uniquement
|
|
||||||
$newsIdsPublishedOns = array_slice($newsIdsPublishedOns, 0, $this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage']) );
|
|
||||||
$newsIdsStates = helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'state', 'SORT_DESC');
|
$newsIdsStates = helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'state', 'SORT_DESC');
|
||||||
foreach($newsIdsPublishedOns as $newsId => $newsPublishedOn) {
|
foreach($newsIdsPublishedOns as $newsId => $newsPublishedOn) {
|
||||||
if($newsPublishedOn <= time() AND $newsIdsStates[$newsId]) {
|
if($newsPublishedOn <= time() AND $newsIdsStates[$newsId]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user