Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Classes/Controller/FeedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use Psr\Http\Message\ResponseInterface;

/**
* RSS display that will fetch the content of a RSS Feed and display it onto the Frontend.
Expand Down Expand Up @@ -68,7 +69,7 @@ public function showAction()
$this->view->assign('title', $feed->get_title());
$this->view->assign('items', $feed->get_items(0, (int)$this->settings['numberOfItems']));
$this->view->assign('settings', $this->settings);
$cObj = $this->configurationManager->getContentObject();
$cObj = $this->request->getAttribute('currentContentObject');
$this->view->assign('data', $cObj->data);
$result = $this->view->render();

Expand All @@ -79,7 +80,7 @@ public function showAction()
}
}

return $result;
return $this->htmlResponse($result);
}

/**
Expand All @@ -106,7 +107,7 @@ protected function canFetchResultFromCache()
$result = FALSE;
if ($this->getPluginType() === self::PLUGIN_TYPE_USER_INT
&& $this->getCacheInstance()->has($this->getCacheIdentifier())
&& !GeneralUtility::_GET('no_cache')
&& !($this->request->getQueryParams()['no_cache'] ?? null)
) {
$result = TRUE;
}
Expand Down
1 change: 0 additions & 1 deletion Configuration/FlexForm/feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<type>select</type>
<itemsProcFunc>Fab\RssDisplay\Backend\FlexformHelper->populateTemplatesList</itemsProcFunc>
<renderType>selectSingle</renderType>
<items></items>
</config>
</TCEforms>
</settings.template>
Expand Down
12 changes: 12 additions & 0 deletions Configuration/Services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
# general settings
_defaults:
autowire: true
autoconfigure: true
public: false

Fab\RssDisplay\:
resource: '../Classes/*'

Fab\RssDisplay\Controller\FeedController:
public: true
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php

defined('TYPO3_MODE') or die();
defined('TYPO3') or die();

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'rss_display',
'Pi1',
'Fetch and display a RSS feed'
);

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('rssdisplay_pi1', 'FILE:EXT:rss_display/Configuration/FlexForm/feed.xml');
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['rssdisplay_pi1'] = 'layout, select_key, pages, recursive';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['rssdisplay_pi1'] = 'pi_flexform';
Expand Down
17 changes: 17 additions & 0 deletions Configuration/TsConfig/ContentElementWizard.tsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
mod.wizards {
newContentElement.wizardItems {
plugins {
elements {
rss_display_pi1 {
iconIdentifier = content-widget-rss
title = RSS Feed Display
description = Create a list of rss items
tt_content_defValues {
CType = list
list_type = rss_display_pi1
}
}
}
}
}
}
1 change: 1 addition & 0 deletions Configuration/page.tsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import 'EXT:rss_display/Configuration/TsConfig/ContentElementWizard.tsconfig'
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"issues": "https://github.com/fabarea/rss_display/issues"
},
"require": {
"typo3/cms-core": "^10.4 || ^11.5",
"typo3/cms-core": "^10.4 || ^11.5 || ^12.4 || ^13.4 ",
"simplepie/simplepie": "^1.5"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'author_company' => 'Ecodev',
'constraints' => [
'depends' => [
'typo3' => '10.4.0-11.5.99',
'typo3' => '10.4.0-13.4.99',
],
],
];
11 changes: 8 additions & 3 deletions ext_localconf.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php
if (!defined('TYPO3_MODE')) die ('Access denied.');
declare(strict_types=1);

if (!defined('TYPO3')) die ('Access denied.');


use Fab\RssDisplay\Controller\FeedController;
$typo3Version = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class);

// Define whether USER or USER_INT.
Expand Down Expand Up @@ -30,8 +35,8 @@
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'rss_display',
'Pi1',
[\Fab\RssDisplay\Controller\FeedController::class => 'show'],
$pluginType === 'USER_INT' ? [\Fab\RssDisplay\Controller\FeedController::class => 'show'] : [],
[FeedController::class => 'show'],
$pluginType === 'USER_INT' ? [FeedController::class => 'show'] : [],
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_PLUGIN
);

Expand Down
8 changes: 6 additions & 2 deletions ext_tables.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
if (!defined('TYPO3_MODE')) die ('Access denied.');
if (!defined('TYPO3')) die ('Access denied.');
$typo3Version = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class);


// Possible Static TS loading
Expand All @@ -10,7 +11,10 @@
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('rss_display', 'Configuration/TypoScript', 'RSS Display: display a RSS / Atom feed');
}

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'][\Fab\RssDisplay\Backend\Wizard::class] = \Fab\RssDisplay\Backend\Wizard::class;
if ($typo3Version->getMajorVersion() < 12) {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'][\Fab\RssDisplay\Backend\Wizard::class] = \Fab\RssDisplay\Backend\Wizard::class;
}


call_user_func(function () {
/**
Expand Down