Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatible with TYPO3 12 #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
42 changes: 42 additions & 0 deletions Configuration/Services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false

RichardHaeser\YoastSeoNews\:
resource: '../Classes/*'

# YoastSeoForTypo3\YoastSeo\Backend\PageLayoutHeader:
# public: true

# YoastSeoForTypo3\YoastSeo\Service\LocaleService:
# public: true

# YoastSeoForTypo3\YoastSeo\Service\SnippetPreviewService:
# public: true

# YoastSeoForTypo3\YoastSeo\Controller\AjaxController:
# public: true

# YoastSeoForTypo3\YoastSeo\EventListener\TcaBuiltListener:
# arguments:
# - '@YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder'
# tags:
# - name: event.listener
# identifier: 'yoastTca'
# event: TYPO3\CMS\Core\Configuration\Event\AfterTcaCompilationEvent
# method: 'addRecordTca'

# YoastSeoForTypo3\YoastSeo\PageTitle\RecordPageTitleProvider:
# arguments:
# - '@YoastSeoForTypo3\YoastSeo\Record\RecordService'

# YoastSeoForTypo3\YoastSeo\MetaTag\RecordMetaTagGenerator:
# arguments:
# - '@YoastSeoForTypo3\YoastSeo\Record\RecordService'

# YoastSeoForTypo3\YoastSeo\Widgets\Provider\OrphanedContentDataProvider:
# arguments:
# $excludedDoktypes: [3, 4, 6, 7, 199, 254, 255]
# $limit: 8
2 changes: 1 addition & 1 deletion Configuration/TCA/Overrides/pages.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
defined('TYPO3_MODE') || die('Access denied.');
defined('TYPO3') || die('Access denied.');

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
'yoast_news',
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TCA/Overrides/sys_template.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
defined('TYPO3_MODE') || die('Access denied.');
defined('TYPO3') || die('Access denied.');

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'yoast_news',
Expand Down
82 changes: 38 additions & 44 deletions Configuration/TCA/Overrides/tx_news_domain_model_news.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,33 +100,30 @@
'og_image' => [
'exclude' => true,
'label' => $llPrefix . 'og_image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'og_image',
[
// Use the imageoverlayPalette instead of the basicoverlayPalette
'overrideChildTca' => [
'types' => [
'0' => [
'showitem' => '
--palette--;;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;;imageoverlayPalette,
--palette--;;filePalette'
]
'config' => [
'type' => 'file',
// Use the imageoverlayPalette instead of the basicoverlayPalette
'overrideChildTca' => [
'types' => [
'0' => [
'showitem' => '
--palette--;;imageoverlayPalette,
--palette--;;filePalette'
],
'columns' => [
'crop' => $openGraphCropConfiguration
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;;imageoverlayPalette,
--palette--;;filePalette'
]
],
'behaviour' => [
'allowLanguageSynchronization' => true
'columns' => [
'crop' => $openGraphCropConfiguration
]
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
)
'behaviour' => [
'allowLanguageSynchronization' => true
]
],
],
'twitter_title' => [
'exclude' => true,
Expand All @@ -152,33 +149,30 @@
'twitter_image' => [
'exclude' => true,
'label' => $llPrefix . 'twitter_image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'twitter_image',
[
// Use the imageoverlayPalette instead of the basicoverlayPalette
'overrideChildTca' => [
'types' => [
'0' => [
'showitem' => '
--palette--;;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;;imageoverlayPalette,
--palette--;;filePalette'
]
'config' => [
'type' => 'file',
// Use the imageoverlayPalette instead of the basicoverlayPalette
'overrideChildTca' => [
'types' => [
'0' => [
'showitem' => '
--palette--;;imageoverlayPalette,
--palette--;;filePalette'
],
'columns' => [
'crop' => $openGraphCropConfiguration
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;;imageoverlayPalette,
--palette--;;filePalette'
]
],
'behaviour' => [
'allowLanguageSynchronization' => true
'columns' => [
'crop' => $openGraphCropConfiguration
]
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
)
'behaviour' => [
'allowLanguageSynchronization' => true
],
],
],
]
);
Expand Down
3 changes: 2 additions & 1 deletion Configuration/TypoScript/CMS8/setup.typoscript
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[globalVar = GP:tx_news_pi1|news > 0] || [globalVar = GP:tx_news_pi1|news_preview > 0]
// [globalVar = GP:tx_news_pi1|news > 0] || [globalVar = GP:tx_news_pi1|news_preview > 0]
[traverse(request.getQueryParams(), 'tx_news_pi1/news') > 0 || traverse(request.getQueryParams(), 'tx_news_pi1/news_preview') > 0]
page.meta {
description.cObject =< lib.yoastSEO.description
robots.cObject < lib.yoastSEO.robotInstructions
Expand Down
3 changes: 2 additions & 1 deletion Configuration/TypoScript/setup.typoscript
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[globalVar = GP:tx_news_pi1|news_preview > 0]
// [globalVar = GP:tx_news_pi1|news_preview > 0]
[traverse(request.getQueryParams(), 'tx_news_pi1/news_preview') > 0]
lib.yoastSEO.currentURL.stdWrap.typolink {
addQueryString.exclude = type,tx_news_pi1[news_preview]
additionalParams = &tx_news_pi1[news]={GP:tx_news_pi1|news_preview}
Expand Down
57 changes: 39 additions & 18 deletions ext_emconf.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
<?php
$EM_CONF['yoast_news'] = [
'title' => 'Yoast SEO for TYPO3 - EXT:news',
'description' => 'Integrate Yoast SEO for TYPO3 in EXT:news',
'category' => 'fe',
'state' => 'stable',
'author' => 'Richard Haeser',
'author_email' => 'richard@richardhaeser.com',
'version' => '2.1.2',
'constraints' => [
'depends' => [
'news' => '7.0.0-8.99.99',
'yoast_seo' => '5.0.0-7.99.99',
'typo3' => '8.7.0-10.4.99'
],
'conflicts' => [],
'suggests' => []
],
];

/***************************************************************
* Extension Manager/Repository config file for ext "yoast_news".
*
* Auto generated 01-09-2022 16:19
*
* Manual updates:
* Only the data in the array - everything else is removed by next
* writing. "version" and "dependencies" must not be touched!
***************************************************************/

$EM_CONF[$_EXTKEY] = array (
'title' => 'Yoast SEO for TYPO3 - EXT:news',
'description' => 'MODIFIED: TYPO3 12. Integrate Yoast SEO for TYPO3 in EXT:news',
'category' => 'fe',
'version' => '2.1.2',
'state' => 'stable',
'uploadfolder' => false,
'clearcacheonload' => false,
'author' => 'Richard Haeser',
'author_email' => 'richard@richardhaeser.com',
'author_company' => NULL,
'constraints' =>
array (
'depends' =>
array (
'news' => '7.0.0-11.99.99',
'yoast_seo' => '5.0.0-9.99.99',
'typo3' => '8.7.0-12.4.99',
),
'conflicts' =>
array (
),
'suggests' =>
array (
),
),
);