forked from ZwiiCMS-Team/ZwiiCMS
blog 3.1 bug minitaure rss
This commit is contained in:
parent
05caca8b17
commit
22f371ccdb
@ -16,7 +16,7 @@
|
|||||||
class blog extends common
|
class blog extends common
|
||||||
{
|
{
|
||||||
|
|
||||||
const VERSION = '6.3';
|
const VERSION = '6.31';
|
||||||
const REALNAME = 'Blog';
|
const REALNAME = 'Blog';
|
||||||
const DELETE = true;
|
const DELETE = true;
|
||||||
const UPDATE = '0.0';
|
const UPDATE = '0.0';
|
||||||
@ -173,8 +173,8 @@ class blog extends common
|
|||||||
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 = pathinfo($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 = 'mini_' . $parts['basename'];
|
||||||
// Créer les articles du flux
|
// Créer les articles du flux
|
||||||
$newsArticle = $feeds->createNewItem();
|
$newsArticle = $feeds->createNewItem();
|
||||||
// Signature de l'article
|
// Signature de l'article
|
||||||
@ -182,7 +182,7 @@ class blog extends common
|
|||||||
$newsArticle->addElementArray([
|
$newsArticle->addElementArray([
|
||||||
'title' => $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title']),
|
'title' => $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title']),
|
||||||
'link' => helper::baseUrl() . $this->getUrl(0) . '/' . $articleId,
|
'link' => helper::baseUrl() . $this->getUrl(0) . '/' . $articleId,
|
||||||
'description' => '<img src="' . helper::baseUrl() . self::FILE_DIR . $thumb
|
'description' => '<img src="' . helper::baseUrl(false) . self::FILE_DIR .'thumb/' . $thumb
|
||||||
. '" alt="' . $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title'])
|
. '" alt="' . $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title'])
|
||||||
. '" title="' . $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title'])
|
. '" title="' . $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title'])
|
||||||
. '" />' .
|
. '" />' .
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
# version 6.31
|
||||||
|
- Miniature de l'image dans le flux RSS
|
||||||
|
# version 6.3
|
||||||
|
- Nettoyage de fonction inutile
|
||||||
|
- Initialisation
|
||||||
# version 6.22
|
# version 6.22
|
||||||
- mise en oeuvre du helper dateUTF8
|
- mise en oeuvre du helper dateUTF8
|
||||||
- Réglage de l'initialisaion de la configuration
|
- Réglage de l'initialisaion de la configuration
|
||||||
|
@ -93,8 +93,8 @@
|
|||||||
) : ?>
|
) : ?>
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php // Déterminer le nom de la miniature
|
<?php // Déterminer le nom de la miniature
|
||||||
$parts = explode('/', $article['picture']);
|
$parts = pathinfo($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'picture']));
|
||||||
$thumb = str_replace($parts[(count($parts) - 1)], 'mini_' . $parts[(count($parts) - 1)], $article['picture']);
|
$thumb = 'mini_' . $parts['basename'];
|
||||||
// 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(
|
$this->makeThumb(
|
||||||
|
Loading…
Reference in New Issue
Block a user