Skip to content
Snippets Groups Projects
Commit 91c18acd authored by Paul Ilea's avatar Paul Ilea
Browse files

Merge branch 'master' into feature_be_module

parents 8f67515e 0a74bca8
No related branches found
No related tags found
1 merge request!2Feature be module
<?php
namespace SGalinski\SgNews\Utility;
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
/**
* Helper class to detect the used TYPO3 version.
*/
class VersionUtility {
/**
* Returns true if the current version ts TYPO3 6.2.
*
* @return bool
*/
public static function isVersion62() {
$versionNumber = self::getVersion();
return ($versionNumber >= 6002000 && $versionNumber < 7000000);
}
/**
* Returns true if the current version ts TYPO3 7.6 and less version 8
*
* @return bool
*/
public static function isVersion76() {
$versionNumber = self::getVersion();
return ($versionNumber >= 7006000 && $versionNumber < 8000000);
}
/**
* Returns true if the current version ts TYPO3 7.6 or later
*
* @return bool
*/
public static function isVersion76OOrHigher() {
return (self::getVersion() >= 7006000);
}
/**
* Returns true if the current version ts TYPO3 8.7 or later
*
* @return bool
*/
public static function isVersion870OrHigher() {
return (self::getVersion() >= 8007000);
}
/**
* Returns the current version as an integer.
*
* @return int
*/
protected static function getVersion() {
return VersionNumberUtility::convertVersionNumberToInteger(
VersionNumberUtility::getNumericTypo3Version()
);
}
}
<?php
namespace SGalinski\SgNews\Xclass;
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Persistence\Generic\Qom;
use TYPO3\Languagevisibility\Service\FrontendServices;
/**
* Xclass for the TYPO3 db backend, which handles, that the l18n_cfg parameters are used for pages in Extbase.
*/
class Typo3DbBackend extends \TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend {
/**
* Performs workspace and language overlay on the given row array. The language and workspace id is automatically
* detected (depending on FE or BE context). You can also explicitly set the language/workspace id.
*
* @param Qom\SourceInterface $source The source (selector od join)
* @param array $rows
* @param \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface $querySettings The TYPO3 CMS specific query settings
* @param null|int $workspaceUid
* @return array
*/
protected function doLanguageAndWorkspaceOverlay(Qom\SourceInterface $source, array $rows, \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface $querySettings, $workspaceUid = null)
{
if ($source instanceof Qom\SelectorInterface) {
$tableName = $source->getSelectorName();
} elseif ($source instanceof Qom\JoinInterface) {
$tableName = $source->getRight()->getSelectorName();
} else {
// No proper source, so we do not have a table name here
// we cannot do an overlay and return the original rows instead.
return $rows;
}
$pageRepository = $this->getPageRepository();
if (is_object($GLOBALS['TSFE'])) {
if ($workspaceUid !== null) {
$pageRepository->versioningWorkspaceId = $workspaceUid;
}
} else {
if ($workspaceUid === null) {
$workspaceUid = $GLOBALS['BE_USER']->workspace;
}
$pageRepository->versioningWorkspaceId = $workspaceUid;
}
// Fetches the move-placeholder in case it is supported
// by the table and if there's only one row in the result set
// (applying this to all rows does not work, since the sorting
// order would be destroyed and possible limits not met anymore)
if (!empty($pageRepository->versioningWorkspaceId)
&& BackendUtility::isTableWorkspaceEnabled($tableName)
&& count($rows) === 1
) {
$movePlaceholder = $this->databaseHandle->exec_SELECTgetSingleRow(
$tableName . '.*',
$tableName,
't3ver_state=3 AND t3ver_wsid=' . $pageRepository->versioningWorkspaceId
. ' AND t3ver_move_id=' . $rows[0]['uid']
);
if (!empty($movePlaceholder)) {
$rows = array($movePlaceholder);
}
}
$isLanguagevisibilityLoaded = ExtensionManagementUtility::isLoaded('languagevisibility');
$overlaidRows = array();
foreach ($rows as $row) {
// If current row is a translation select its parent
if (isset($tableName) && isset($GLOBALS['TCA'][$tableName])
&& isset($GLOBALS['TCA'][$tableName]['ctrl']['languageField'])
&& isset($GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'])
&& !isset($GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerTable'])
) {
if (isset($row[$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']])
&& $row[$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']] > 0
) {
$row = $this->databaseHandle->exec_SELECTgetSingleRow(
$tableName . '.*',
$tableName,
$tableName . '.uid=' . (int)$row[$GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField']] .
' AND ' . $tableName . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] . '=0'
);
}
}
$pageRepository->versionOL($tableName, $row, true);
if ($tableName == 'pages') {
// Start of the patch
// Applies the language visibility logic.
if ($isLanguagevisibilityLoaded && is_object($GLOBALS['TSFE'])) {
$sysLanguageUid = $GLOBALS['TSFE']->sys_language_uid;
if (!FrontendServices::checkVisiblityForElement((int) $row['uid'], $tableName, $sysLanguageUid)) {
// Page not visible
continue;
}
}
// End of the patch
$row = $pageRepository->getPageOverlay($row, $querySettings->getLanguageUid());
if ($row === null || !is_array($row)) {
continue;
}
// Start of the patch
$l18nConfiguration = $row['l18n_cfg'];
if ($l18nConfiguration > 0) {
if (is_object($GLOBALS['TSFE'])) {
$sysLanguageUid = $GLOBALS['TSFE']->sys_language_uid;
if ($sysLanguageUid > 0) {
// Request the overlay record for the sys_language_uid:
$pageOverlay = $pageRepository->getPageOverlay($row['uid'], $sysLanguageUid);
if (empty($pageOverlay) &&
\TYPO3\CMS\Core\Utility\GeneralUtility::hideIfNotTranslated($l18nConfiguration)
) {
// Page is not available in default language.
continue;
}
}
if (!$sysLanguageUid &&
\TYPO3\CMS\Core\Utility\GeneralUtility::hideIfDefaultLanguage($l18nConfiguration)
) {
// Page is not available in default language.
continue;
}
}
}
// End of the patch
} elseif (isset($GLOBALS['TCA'][$tableName]['ctrl']['languageField'])
&& $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] !== ''
&& !isset($GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerTable'])
) {
if (in_array($row[$GLOBALS['TCA'][$tableName]['ctrl']['languageField']], array(-1, 0))) {
$overlayMode = $querySettings->getLanguageOverlayMode();
if ($overlayMode !== 'hideNonTranslated' || preg_match('/sys_file_.*/is', $tableName)) {
$overlayMode = $querySettings->getLanguageMode() === 'strict' ? 'hideNonTranslated' : '';
}
$row = $pageRepository->getRecordOverlay($tableName, $row, $querySettings->getLanguageUid(), $overlayMode);
}
}
if ($row !== null && is_array($row)) {
$overlaidRows[] = $row;
}
}
return $overlaidRows;
}
}
?>
......@@ -188,10 +188,11 @@ $columns = array_merge(
]
],
'tx_sgnews_likes' => [
'label' => 'LLL:EXT:cms/locallang_tca.xlf:fe_users.likes',
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_likes',
'config' => [
'type' => 'input',
'size' => '20'
'size' => '20',
'eval' => 'trim',
]
],
'lastUpdated' => [
......@@ -208,18 +209,8 @@ $columns = array_merge(
], $imageColumns
);
// #
// # Pages
// #
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $columns);
$GLOBALS['TCA']['pages']['palettes']['editorialWithNewsAuthor'] = [
'showitem' => 'tx_sgnews_author;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_author.inPalette,
author;LLL:EXT:cms/locallang_tca.xlf:pages.author_formlabel,
--linebreak--, lastUpdated;LLL:EXT:cms/locallang_tca.xlf:pages.lastUpdated_formlabel',
'canNotCollapse' => 1,
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages_language_overlay', $imageColumns);
$GLOBALS['TCA']['pages']['palettes']['titleDescriptionAndHighlightFlag'] = [
'showitem' => 'subtitle;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.subtitle.inPalette,
......@@ -229,8 +220,21 @@ $GLOBALS['TCA']['pages']['palettes']['titleDescriptionAndHighlightFlag'] = [
'canNotCollapse' => 1,
];
$GLOBALS['TCA']['pages']['types'][116] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.standard;standard,
if (\SGalinski\SgNews\Utility\VersionUtility::isVersion870OrHigher()) {
$GLOBALS['TCA']['pages']['palettes']['editorialWithNewsAuthor'] = [
'showitem' => 'tx_sgnews_author;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_author.inPalette,
author;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.author_formlabel,
--linebreak--, lastUpdated;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.lastUpdated_formlabel,
tx_sgnews_likes',
'canNotCollapse' => 1,
];
#
# Pages
#
$GLOBALS['TCA']['pages']['types'][116] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.standard;standard,
--palette--;;titleDescriptionAndHighlightFlag,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.editorial;editorialWithNewsAuthor,
tx_sgnews_related_news, tx_sgnews_tags,
......@@ -242,7 +246,7 @@ $GLOBALS['TCA']['pages']['types'][116] = [
tx_projectbase_seo_titletag,tx_projectbase_seo_canonicaltag,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.appearance,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.layout;layout,
--div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.access,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.visibility;visibility,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.access;access,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.behaviour,
......@@ -250,10 +254,10 @@ $GLOBALS['TCA']['pages']['types'][116] = [
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.language;language,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.miscellaneous;miscellaneous,
'
];
];
$GLOBALS['TCA']['pages']['types'][117] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.standard;standard,
$GLOBALS['TCA']['pages']['types'][117] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.standard;standard,
title, tx_realurl_pathsegment, tx_realurl_exclude,
--div--;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tabs.images,
tx_sgnews_teaser2_image, tx_sgnews_teaser1_image,
......@@ -263,7 +267,7 @@ $GLOBALS['TCA']['pages']['types'][117] = [
tx_projectbase_seo_titletag,tx_projectbase_seo_canonicaltag, description,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.appearance,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.layout;layout,
--div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.access,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.visibility;visibility,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.access;access,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.behaviour,
......@@ -271,28 +275,102 @@ $GLOBALS['TCA']['pages']['types'][117] = [
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.language;language,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.miscellaneous;miscellaneous,
'
];
];
// Removal of the realurl fields, if the extension isn't installed.
if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('realurl')) {
$GLOBALS['TCA']['pages']['palettes']['titleDescriptionAndHighlightFlag'] = str_replace(
'--linebreak--, tx_realurl_pathsegment, tx_realurl_exclude,', '',
$GLOBALS['TCA']['pages']['palettes']['titleDescriptionAndHighlightFlag']
);
$GLOBALS['TCA']['pages']['types'][117] = str_replace(
'tx_realurl_pathsegment, tx_realurl_exclude,', '',
$GLOBALS['TCA']['pages']['types'][117]
);
}
#
# Pages Overlay
#
$GLOBALS['TCA']['pages_language_overlay']['types'][116] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.standard;standard,
subtitle;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.subtitle.inPalette,
description, tx_realurl_pathsegment, author,
--div--;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tabs.images,
tx_sgnews_teaser2_image, tx_sgnews_teaser1_image,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.metadata,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.abstract;abstract,
tx_projectbase_seo_titletag,tx_projectbase_seo_canonicaltag,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
sys_language_uid,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.visibility;hiddenonly,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.access;access'
];
// #
// # Pages Overlay
// #
$GLOBALS['TCA']['pages_language_overlay']['types'][117] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.standard;standard,
title, tx_realurl_pathsegment,
--div--;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tabs.images,
tx_sgnews_teaser2_image, tx_sgnews_teaser1_image,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.metadata,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.abstract;abstract,
tx_projectbase_seo_titletag,tx_projectbase_seo_canonicaltag, description,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
sys_language_uid,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.visibility;hiddenonly,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.access;access'
];
} else {
$GLOBALS['TCA']['pages']['palettes']['editorialWithNewsAuthor'] = [
'showitem' => 'tx_sgnews_author;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_author.inPalette,
author;LLL:EXT:cms/locallang_tca.xlf:pages.author_formlabel,
--linebreak--, lastUpdated;LLL:EXT:cms/locallang_tca.xlf:pages.lastUpdated_formlabel,
tx_sgnews_likes',
'canNotCollapse' => 1,
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages_language_overlay', $imageColumns);
#
# Pages
#
$GLOBALS['TCA']['pages']['types'][116] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.standard;standard,
--palette--;;titleDescriptionAndHighlightFlag,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.editorial;editorialWithNewsAuthor,
tx_sgnews_related_news, tx_sgnews_tags,
--div--;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tabs.images,
tx_sgnews_teaser2_image, tx_sgnews_teaser1_image,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.metadata,
tx_projectbase_devnullrobots_flags,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.abstract;abstract,
tx_projectbase_seo_titletag,tx_projectbase_seo_canonicaltag,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.appearance,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.layout;layout,
--div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.access,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.visibility;visibility,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.access;access,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.behaviour,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.caching;caching,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.language;language,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.miscellaneous;miscellaneous,
'
];
$GLOBALS['TCA']['pages']['types'][117] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.standard;standard,
title, tx_realurl_pathsegment, tx_realurl_exclude,
--div--;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tabs.images,
tx_sgnews_teaser2_image, tx_sgnews_teaser1_image,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.metadata,
tx_projectbase_devnullrobots_flags,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.abstract;abstract,
tx_projectbase_seo_titletag,tx_projectbase_seo_canonicaltag, description,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.appearance,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.layout;layout,
--div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.access,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.visibility;visibility,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.access;access,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.behaviour,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.caching;caching,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.language;language,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.miscellaneous;miscellaneous,
'
];
$GLOBALS['TCA']['pages_language_overlay']['types'][116] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.standard;standard,
#
# Pages Overlay
#
$GLOBALS['TCA']['pages_language_overlay']['types'][116] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.standard;standard,
subtitle;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.subtitle.inPalette,
description, tx_realurl_pathsegment, author,
--div--;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tabs.images,
......@@ -303,10 +381,10 @@ $GLOBALS['TCA']['pages_language_overlay']['types'][116] = [
--div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.access,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.visibility;hiddenonly,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.access;access'
];
];
$GLOBALS['TCA']['pages_language_overlay']['types'][117] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.standard;standard,
$GLOBALS['TCA']['pages_language_overlay']['types'][117] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.standard;standard,
title, tx_realurl_pathsegment,
--div--;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tabs.images,
tx_sgnews_teaser2_image, tx_sgnews_teaser1_image,
......@@ -316,4 +394,17 @@ $GLOBALS['TCA']['pages_language_overlay']['types'][117] = [
--div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.access,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.visibility;hiddenonly,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.access;access'
];
];
}
// Removal of the realurl fields, if the extension isn't installed.
if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('realurl')) {
$GLOBALS['TCA']['pages']['palettes']['titleDescriptionAndHighlightFlag'] = str_replace(
'--linebreak--, tx_realurl_pathsegment, tx_realurl_exclude,', '',
$GLOBALS['TCA']['pages']['palettes']['titleDescriptionAndHighlightFlag']
);
$GLOBALS['TCA']['pages']['types'][117] = str_replace(
'tx_realurl_pathsegment, tx_realurl_exclude,', '',
$GLOBALS['TCA']['pages']['types'][117]
);
}
......@@ -33,6 +33,7 @@ newsFeed {
additionalHeaders = Content-type:text/xml
no_cache = 1
xhtml_cleaning = 0
index_enable = 0
}
}
......
......@@ -15,6 +15,14 @@ TYPO3 version: >7.6
Integrates a powerful News system. News and Categories can be created like normal TYPO3 pages. Newspages have several
additional meta information.
### Why does it need the extension "stefanfroemken/repair_translation"?
This extensions adds the behaviour, that the images of the localization of a news or categories could be differ
to the image in the default language. So the images can be translated now.
NOTE: This extension is just working, if the patch "pages_language_overlay_fix.diff" is active. The pull request for
this patch could be found here: [pull request](https://github.com/froemken/repair_translation/pull/1)
## Integration
......
......@@ -29,6 +29,10 @@
<source>Highlighted / Top Element</source>
<target>Hervorgehoben / Top-Element</target>
</trans-unit>
<trans-unit id="pages.tx_sgnews_likes" approved="yes">
<source>Like Count</source>
<target>Anzahl der Likes</target>
</trans-unit>
<trans-unit id="pages.tx_sgnews_never_highlighted" approved="yes">
<source>Don't show in "Latest News"</source>
<target>Nicht in "letzten News" anzeigen</target>
......
......@@ -24,6 +24,9 @@
<trans-unit id="pages.tx_sgnews_highlighted">
<source>Highlighted / Top Element</source>
</trans-unit>
<trans-unit id="pages.tx_sgnews_likes">
<source>Like Count</source>
</trans-unit>
<trans-unit id="pages.tx_sgnews_never_highlighted">
<source>Don't show in "Latest News"</source>
</trans-unit>
......
......@@ -6,19 +6,25 @@
"license": [
"GPL-2.0+"
],
"version": "3.9.3",
"version": "4.1.4",
"support": {
},
"repositories": [
{
"type": "composer",
"url": "https://packages.sgalinski.de/"
},
{
"type": "vcs",
"url": "https://github.com/froemken/repair_translation.git"
}
],
"require": {
"typo3/cms-core": "7.6.0 - 8.7.99"
"typo3/cms-core": "7.6.0 - 8.7.99",
"stefanfroemken/repair_translation": "^1.0"
},
"suggest": {
"sgalinski/languagevisibility": "Minimum version 1.1 required, if multi language is enabled",
"sgalinski/sg-ajax": "Needed for the like feature",
"sgalinski/sg-comments": "Flexible comments system",
"typo3-ter/rx-shariff": "Social Share possibilities"
......
......@@ -19,7 +19,7 @@ $EM_CONF[$_EXTKEY] = [
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'lockType' => '',
'version' => '3.9.3',
'version' => '4.1.4',
'constraints' => [
'depends' => [
'typo3' => '7.6.0-8.7.99',
......@@ -30,6 +30,7 @@ $EM_CONF[$_EXTKEY] = [
'sg_comments' => '2.1.0-',
'rx_shariff' => '5.0.1-',
'sg_ajax' => '1.0.6-',
'languagevisibility' => '1.1.0-',
],
],
'suggests' => [],
......
......@@ -77,8 +77,6 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['proc
// Xclasses
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\CMS\Core\Page\PageRenderer'] =
['className' => 'SGalinski\SgNews\Xclass\PageRenderer'];
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend'] =
['className' => 'SGalinski\SgNews\Xclass\Typo3DbBackend'];
// add realurl configuration
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('realurl')) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment