Skip to content
Snippets Groups Projects
Commit e2c813e1 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

Merge branch 'feature_UpgradeTo9LTS' into 'master'

Feature upgrade to9 lts

See merge request !8
parents 292066f8 28280660
No related branches found
No related tags found
1 merge request!8Feature upgrade to9 lts
Showing
with 872 additions and 533 deletions
......@@ -26,7 +26,7 @@ namespace SGalinski\SgNews\ViewHelpers;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* View helper that returns the estimates reading time of a given content
......@@ -36,13 +36,22 @@ use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
* <sg:getReadingTime content="" />
*/
class GetReadingTimeViewHelper extends AbstractViewHelper {
/**
* Register the ViewHelper arguments
*/
public function initializeArguments() {
parent::initializeArguments();
$this->registerArgument('content', 'string', 'The content to read', TRUE);
}
/**
* Returns the estimated reading time of the given content
*
* @param string $content
* @return string
*/
public function render($content): string {
public function render(): string {
$content = $this->arguments['content'];
$word = str_word_count(strip_tags($content));
$minutes = floor($word / 200);
$seconds = floor($word % 200 / (200 / 60));
......
......@@ -26,7 +26,8 @@ namespace SGalinski\SgNews\ViewHelpers;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
/**
......@@ -46,14 +47,36 @@ class PageBrowserViewHelper extends AbstractViewHelper {
*/
protected $escapeOutput = FALSE;
/**
* @var ObjectManager
*/
protected $objectManager;
/**
* Inject the ObjectManager
*
* @param ObjectManager $objectManager
*/
public function injectObjectManager(ObjectManager $objectManager) {
$this->objectManager = $objectManager;
}
/**
* Initialize the ViewHelpers arguments
*/
public function initializeArguments() {
parent::initializeArguments();
$this->registerArgument('numberOfPages', 'int', 'The number of pages to browse', TRUE);
}
/**
* Render method of the view helper.
*
* @param integer $numberOfPages
* @return string
* @throws \UnexpectedValueException
*/
public function render($numberOfPages): string {
public function render(): string {
$numberOfPages = $this->arguments['numberOfPages'];
$configuration = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_sgnews.']['pagebrowser.'];
$configuration['settings.']['numberOfPages'] = (int) $numberOfPages;
......
<?php
/**
*
* 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!
*/
$imageColumns = [
'tx_sgnews_teaser1_image' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_teaser1_image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'tx_sgnews_teaser1_image',
call_user_func(
function ($extKey, $table) {
$localLangDbPath = 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:';
$localLangBackendPath = 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_backend.xlf:';
foreach (
[
'maxitems' => 9999,
'foreign_types' => [
'0' => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
]
\SGalinski\SgNews\Utility\BackendNewsUtility::CATEGORY_DOKTYPE => [
'icon' => 'EXT:sg_news/Resources/Public/Images/Category.png',
'locallangIndex' => 'pageType.category'
],
\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE => [
'icon' => 'EXT:sg_news/Resources/Public/Images/News.png',
'locallangIndex' => 'pageType.news'
]
] as $doktype => $configuration) {
// add the new doktype to the page type selector
$GLOBALS['TCA'][$table]['columns']['doktype']['config']['items'][] = [
$localLangBackendPath . $configuration['locallangIndex'],
$doktype,
$configuration['icon']
];
// also add the new doktype to the page language overlays type selector (so that translations can inherit the same type)
$GLOBALS['TCA']['' . $table . '_language_overlay']['columns']['doktype']['config']['items'][] = [
$localLangBackendPath . $configuration['locallangIndex'],
$doktype,
$configuration['icon']
];
$GLOBALS['TCA'][$table]['ctrl']['typeicon_classes'][$doktype] = 'tcarecords-' . $table . '-' . $doktype;
// add the new doktype to the list of page types
$GLOBALS['PAGES_TYPES'][$doktype] = [
'type' => 'sys',
'icon' => $configuration['icon'],
'allowedTables' => '*',
];
}
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE] = [
'showitem' => '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
--palette--;;standard,
--palette--;;titleDescriptionAndHighlightFlag,
--palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.editorial;editorialWithNewsAuthor,
tx_sgnews_related_news, tx_sgnews_tags,
--div--;' . $localLangDbPath . $table . '.tabs.images,
tx_sgnews_teaser2_image, tx_sgnews_teaser1_image,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.tabs.metadata,
tx_projectbase_devnullrobots_flags,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.abstract;abstract,
tx_projectbase_seo_titletag,tx_projectbase_seo_canonicaltag,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.tabs.appearance,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.layout;layout,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
--palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.visibility;visibility,
--palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.access;access,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.tabs.behaviour,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.caching;caching,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.miscellaneous;miscellaneous,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
--palette--;;language
'
];
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::CATEGORY_DOKTYPE] = [
'showitem' => '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
--palette--;;standard,
title, slug, tx_realurl_pathsegment, tx_realurl_exclude,
--div--;' . $localLangDbPath . $table . '.tabs.images,
tx_sgnews_teaser2_image, tx_sgnews_teaser1_image,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.tabs.metadata,
tx_projectbase_devnullrobots_flags,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.abstract;abstract,
tx_projectbase_seo_titletag,tx_projectbase_seo_canonicaltag, description,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.tabs.appearance,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.layout;layout,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
--palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.visibility;visibility,
--palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.access;access,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.tabs.behaviour,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.caching;caching,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.miscellaneous;miscellaneous,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
--palette--;;language
'
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
$table, [
'tx_sgnews_teaser1_image' => [
'exclude' => TRUE,
'label' => $localLangDbPath . $table . '.tx_sgnews_teaser1_image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'tx_sgnews_teaser1_image',
[
'maxitems' => 9999,
'foreign_types' => [
'0' => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
]
],
'appearance' => [
'showPossibleLocalizationRecords' => TRUE,
'showRemovedLocalizationRecords' => TRUE,
'showSynchronizationLink' => TRUE,
'showAllLocalizationLink' => TRUE,
],
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
),
],
'appearance' => [
'showPossibleLocalizationRecords' => TRUE,
'showRemovedLocalizationRecords' => TRUE,
'showSynchronizationLink' => TRUE,
'showAllLocalizationLink' => TRUE,
'tx_sgnews_teaser2_image' => [
'exclude' => TRUE,
'label' => $localLangDbPath . $table . '.tx_sgnews_teaser2_image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'tx_sgnews_teaser2_image',
[
'maxitems' => 9999,
'foreign_types' => [
'0' => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
]
],
'appearance' => [
'showPossibleLocalizationRecords' => TRUE,
'showRemovedLocalizationRecords' => TRUE,
'showSynchronizationLink' => TRUE,
'showAllLocalizationLink' => TRUE,
],
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
),
],
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
),
],
'tx_sgnews_teaser2_image' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_teaser2_image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'tx_sgnews_teaser2_image',
[
'maxitems' => 9999,
'foreign_types' => [
'0' => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
'tx_sgnews_author' => [
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => $localLangDbPath . $table . '.tx_sgnews_author',
'config' => [
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'fe_users',
'size' => 1,
'minitems' => 0,
'maxitems' => 1,
'items' => [
['', ''],
],
'wizards' => [
'suggest' => [
'type' => 'suggest',
],
],
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
'tx_sgnews_related_news' => [
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => $localLangDbPath . $table . '.tx_sgnews_related_news',
'config' => [
'type' => 'group',
'internal_type' => 'db',
'allowed' => $table,
'size' => 5,
'minitems' => 0,
'maxitems' => 99,
'wizards' => [
'suggest' => [
'type' => 'suggest',
],
],
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
'tx_sgnews_highlighted' => [
'displayCond' => 'FIELD:tx_sgnews_never_highlighted:=:0',
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => $localLangDbPath . $table . '.tx_sgnews_highlighted',
'config' => [
'type' => 'check',
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
]
],
'appearance' => [
'showPossibleLocalizationRecords' => TRUE,
'showRemovedLocalizationRecords' => TRUE,
'showSynchronizationLink' => TRUE,
'showAllLocalizationLink' => TRUE,
'tx_sgnews_never_highlighted' => [
'displayCond' => 'FIELD:tx_sgnews_highlighted:=:0',
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => $localLangDbPath . $table . '.tx_sgnews_never_highlighted',
'config' => [
'type' => 'check',
],
],
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
),
],
];
$columns = array_merge(
[
'tx_sgnews_author' => [
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_author',
'config' => [
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'fe_users',
'size' => 1,
'minitems' => 0,
'maxitems' => 1,
'items' => [
['', ''],
'tx_sgnews_tags' => [
'exclude' => 1,
'label' => $localLangDbPath . $table . '.tx_sgnews_tags',
'config' => [
'type' => 'select',
'maxitems' => 9999,
'size' => 10,
'foreign_table' => 'sys_category',
'foreign_table_where' => 'AND (IF (###PAGE_TSCONFIG_ID### = 0, 1, sys_category.pid = ###PAGE_TSCONFIG_ID###)) AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.sorting ASC',
'MM' => 'sys_category_record_mm',
'MM_match_fields' => [
'fieldname' => 'tx_sgnews_tags',
'tablenames' => $table
],
'MM_opposite_field' => 'items',
'renderType' => 'selectTree',
'treeConfig' => [
'parentField' => 'parent',
'appearance' => [
'expandAll' => 1,
'maxLevels' => 99,
'showHeader' => 1
]
]
]
],
'wizards' => [
'suggest' => [
'type' => 'suggest',
],
'tx_sgnews_likes' => [
'label' => $localLangDbPath . $table . '.tx_sgnews_likes',
'config' => [
'type' => 'input',
'size' => '20',
'eval' => 'trim',
]
],
],
],
'tx_sgnews_related_news' => [
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_related_news',
'config' => [
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'pages',
'size' => 5,
'minitems' => 0,
'maxitems' => 99,
'wizards' => [
'suggest' => [
'type' => 'suggest',
],
'lastUpdated' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:cms/locallang_tca.xlf:' . $table . '.lastUpdated',
'config' => [
'type' => 'input',
'size' => '13',
'max' => '20',
'eval' => 'datetime',
'default' => $GLOBALS['EXEC_TIME'],
]
],
],
],
'tx_sgnews_highlighted' => [
'displayCond' => 'FIELD:tx_sgnews_never_highlighted:=:0',
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_highlighted',
'config' => [
'type' => 'check',
],
],
'tx_sgnews_never_highlighted' => [
'displayCond' => 'FIELD:tx_sgnews_highlighted:=:0',
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_never_highlighted',
'config' => [
'type' => 'check',
],
],
'tx_sgnews_tags' => [
'exclude' => 1,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_tags',
'config' => [
'type' => 'select',
'maxitems' => 9999,
'size' => 10,
'foreign_table' => 'sys_category',
'foreign_table_where' => 'AND (IF (###PAGE_TSCONFIG_ID### = 0, 1, sys_category.pid = ###PAGE_TSCONFIG_ID###)) AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.sorting ASC',
'MM' => 'sys_category_record_mm',
'MM_match_fields' => [
'fieldname' => 'tx_sgnews_tags',
'tablenames' => 'pages'
'tx_sgnews_date_end' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_date_end',
'config' => [
'type' => 'input',
'size' => '13',
'max' => '20',
'eval' => 'datetime',
'default' => $GLOBALS['EXEC_TIME'],
]
],
'MM_opposite_field' => 'items',
'renderType' => 'selectTree',
'treeConfig' => [
'parentField' => 'parent',
'appearance' => [
'expandAll' => 1,
'maxLevels' => 99,
'showHeader' => 1
'tx_sgnews_location' => [
'exclude' => TRUE,
'label' => $localLangDbPath . $table . '.tx_sgnews_location',
'config' => [
'type' => 'input',
'size' => 20,
'eval' => 'trim',
'behaviour' => [
'allowLanguageSynchronization' => TRUE
]
]
]
]
],
'tx_sgnews_likes' => [
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_likes',
'config' => [
'type' => 'input',
'size' => '20',
'eval' => 'trim',
]
],
'lastUpdated' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_date_start',
'config' => [
'type' => 'input',
'size' => '13',
'max' => '20',
'eval' => 'datetime',
'default' => $GLOBALS['EXEC_TIME'],
]
],
'tx_sgnews_date_end' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_date_end',
'config' => [
'type' => 'input',
'size' => '13',
'max' => '20',
'eval' => 'datetime',
'default' => $GLOBALS['EXEC_TIME'],
]
],
'tx_sgnews_location' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_location',
'config' => [
'type' => 'input',
'size' => 20,
'eval' => 'trim'
]
]
], $imageColumns
);
$languageOverlayColumns = array_merge(
[
'tx_sgnews_location' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_location',
'config' => [
'type' => 'input',
'size' => 20,
'eval' => 'trim'
]
]
], $imageColumns
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $columns);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages_language_overlay', $languageOverlayColumns);
$GLOBALS['TCA']['pages']['palettes']['titleDescriptionAndHighlightFlag'] = [
'showitem' => 'subtitle;LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.subtitle.inPalette,
--linebreak--, description,
--linebreak--, tx_realurl_pathsegment, tx_realurl_exclude,
--linebreak--, tx_sgnews_highlighted, tx_sgnews_never_highlighted',
'canNotCollapse' => 1,
];
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,
--linebreak--,
author;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.author_formlabel,
author_email;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.author_email_formlabel,
--linebreak--, lastUpdated;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.lastUpdated_formlabel,tx_sgnews_date_end,
--linebreak--,tx_sgnews_likes,tx_sgnews_location',
'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,
--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: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,
--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: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,
--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,
'
];
);
#
# 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, tx_sgnews_location,
--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'
];
$GLOBALS['TCA'][$table]['palettes']['titleDescriptionAndHighlightFlag'] = [
'showitem' => 'subtitle;' . $localLangDbPath . $table . '.subtitle.inPalette,
--linebreak--, title,
--linebreak--, description,
--linebreak--, slug,
--linebreak--, tx_realurl_pathsegment, tx_realurl_exclude,
--linebreak--, tx_sgnews_highlighted, tx_sgnews_never_highlighted',
'canNotCollapse' => 1,
];
$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,
$GLOBALS['TCA'][$table]['palettes']['editorialWithNewsAuthor'] = [
'showitem' => 'tx_sgnews_author;' . $localLangDbPath . $table . '.tx_sgnews_author.inPalette,
--linebreak--,
author;LLL:EXT:cms/locallang_tca.xlf:pages.author_formlabel,
author_email;LLL:EXT:cms/locallang_tca.xlf:pages.author_email_formlabel,
--linebreak--, lastUpdated;LLL:EXT:cms/locallang_tca.xlf:pages.lastUpdated_formlabel,tx_sgnews_date_end,--linebreak--,
tx_sgnews_likes,--linebreak--,tx_sgnews_location',
'canNotCollapse' => 1,
];
author;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.author_formlabel,
author_email;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.author_email_formlabel,
--linebreak--, lastUpdated;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.lastUpdated_formlabel,
tx_sgnews_date_end,
--linebreak--,tx_sgnews_likes,--linebreak--,tx_sgnews_location',
'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,
--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,
'
];
// Removal of the realurl fields, if the extension isn't installed.
if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('realurl')) {
$GLOBALS['TCA'][$table]['palettes']['titleDescriptionAndHighlightFlag'] = str_replace(
'--linebreak--, tx_realurl_pathsegment, tx_realurl_exclude,', '',
$GLOBALS['TCA'][$table]['palettes']['titleDescriptionAndHighlightFlag']
);
$GLOBALS['TCA'][$table]['types'][117] = str_replace(
'tx_realurl_pathsegment, tx_realurl_exclude,', '',
$GLOBALS['TCA'][$table]['types'][117]
);
}
$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,
'
];
if (\version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '9.0.0', '>')) {
// if TYPO3 9.5, exclude a lot of fields from the news doktype in localizations
foreach (
$GLOBALS['TCA'][$table]['columns'] as $languageExcludeField => $_
) {
if (
!\in_array($languageExcludeField, [
'doktype',
'title',
'subtitle',
'description',
'slug',
'tx_sgnews_location',
'tx_sgnews_teaser1_image',
'tx_sgnews_teaser2_image',
'abstract',
'tx_projectbase_seo_titletag',
'tx_projectbase_seo_canonicaltag',
'hidden',
'sys_language_uid',
'tx_languagevisibility_visibility'
])
) {
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides'][$languageExcludeField]['l10n_mode'] = 'exclude';
}
}
#
# 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, tx_sgnews_location,
--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: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,
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: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'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides']['title']['label'] =
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.title';
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides']['subtitle']['label'] =
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.subtitle';
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides']['slug']['label'] =
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.slug';
}
}, 'sg_news', 'pages'
);
// 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]
);
}
<?php
/**
*
* 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!
*/
if (\version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '9.0.0', '<')) {
call_user_func(
function ($extKey, $table) {
$pagesTable = 'pages';
$localLangDbPath = 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:';
$localLangBackendPath = 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_backend.xlf:';
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageOverlayFields'] .= ',tx_sgnews_teaser1_image,tx_sgnews_teaser2_image';
foreach (
[
\SGalinski\SgNews\Utility\BackendNewsUtility::CATEGORY_DOKTYPE => [
'icon' => 'EXT:sg_news/Resources/Public/Images/Category.png',
'locallangIndex' => 'pageType.category'
],
\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE => [
'icon' => 'EXT:sg_news/Resources/Public/Images/News.png',
'locallangIndex' => 'pageType.news'
]
] as $doktype => $configuration) {
// also add the new doktype to the page language overlays type selector (so that translations can inherit the same type)
$GLOBALS['TCA'][$table]['columns']['doktype']['config']['items'][] = [
$localLangBackendPath . $configuration['locallangIndex'],
$doktype,
$configuration['icon']
];
}
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:' . $pagesTable . '.palettes.standard;standard,
subtitle;' . $localLangDbPath . $pagesTable . '.subtitle.inPalette,
description, tx_realurl_pathsegment, author, tx_sgnews_location,
--div--;' . $localLangDbPath . $pagesTable . '.tabs.images,
tx_sgnews_teaser2_image, tx_sgnews_teaser1_image,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $pagesTable . '.tabs.metadata,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $pagesTable . '.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:' . $pagesTable . '.palettes.visibility;hiddenonly,
--palette--;LLL:EXT:cms/locallang_tca.xlf:' . $pagesTable . '.palettes.access;access'
];
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::CATEGORY_DOKTYPE] = [
'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xlf:' . $pagesTable . '.palettes.standard;standard,
title, tx_realurl_pathsegment,
--div--;' . $localLangDbPath . $table . '.tabs.images,
tx_sgnews_teaser2_image, tx_sgnews_teaser1_image,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $pagesTable . '.tabs.metadata,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $pagesTable . '.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:' . $pagesTable . '.palettes.visibility;hiddenonly,
--palette--;LLL:EXT:cms/locallang_tca.xlf:' . $pagesTable . '.palettes.access;access'
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
$table, [
'tx_sgnews_teaser1_image' => [
'exclude' => TRUE,
'label' => $localLangDbPath . $pagesTable . '.tx_sgnews_teaser1_image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'tx_sgnews_teaser1_image',
[
'maxitems' => 9999,
'foreign_types' => [
'0' => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
]
],
'appearance' => [
'showPossibleLocalizationRecords' => TRUE,
'showRemovedLocalizationRecords' => TRUE,
'showSynchronizationLink' => TRUE,
'showAllLocalizationLink' => TRUE,
],
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
),
],
'tx_sgnews_teaser2_image' => [
'exclude' => TRUE,
'label' => $localLangDbPath . $pagesTable . '.tx_sgnews_teaser2_image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'tx_sgnews_teaser2_image',
[
'maxitems' => 9999,
'foreign_types' => [
'0' => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
]
],
'appearance' => [
'showPossibleLocalizationRecords' => TRUE,
'showRemovedLocalizationRecords' => TRUE,
'showSynchronizationLink' => TRUE,
'showAllLocalizationLink' => TRUE,
],
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
),
],
'tx_sgnews_location' => [
'exclude' => TRUE,
'label' => $localLangDbPath . $pagesTable . '.tx_sgnews_location',
'config' => [
'type' => 'input',
'size' => 20,
'eval' => 'trim'
]
]
]
);
}, 'sg_news', 'pages_language_overlay'
);
}
<?php
/**
*
* 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!
*/
call_user_func(
function ($extKey, $table) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$extKey, 'Configuration/TypoScript/Frontend', 'News System'
);
}, 'sg_news', 'sys_template'
);
<?php
/**
*
* 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!
*/
call_user_func(
function ($extKey, $table) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$extKey,
'Overview',
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_backend.xlf:pageTypeTitlePluginOverview.news'
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$extKey,
'Latest',
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_backend.xlf:pageTypeTitlePluginLatest.news'
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$extKey,
'ListByCategory',
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_backend.xlf:pageTypeTitlePluginCategory.news'
);
// Removal of the unused plugin setting fields
$GLOBALS['TCA'][$table]['types']['list']['subtypes_excludelist']['sgnews_overview'] = 'select_key,pages,recursive';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_excludelist']['sgnews_listbycategory'] = 'select_key,pages,recursive';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_excludelist']['sgnews_latest'] = 'select_key,pages,recursive';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_excludelist']['sgnews_singleview'] = 'select_key,pages,recursive';
// Flex form assignment
$pluginSignature = str_replace('_', '', $extKey) . '_overview';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature, 'FILE:EXT:' . $extKey . '/Configuration/FlexForms/Overview.xml'
);
$pluginSignature = str_replace('_', '', $extKey) . '_listbycategory';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature, 'FILE:EXT:' . $extKey . '/Configuration/FlexForms/ListByCategory.xml'
);
$pluginSignature = str_replace('_', '', $extKey) . '_latest';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature, 'FILE:EXT:' . $extKey . '/Configuration/FlexForms/Latest.xml'
);
}, 'sg_news', 'tt_content'
);
......@@ -22,17 +22,6 @@ mod {
}
}
single {
iconIdentifier = sg_news-module
title = LLL:EXT:sg_news/Resources/Private/Language/locallang_backend.xlf:titleSingleViewPlugin
description = LLL:EXT:sg_news/Resources/Private/Language/locallang_backend.xlf:descriptionSingleViewPlugin
tt_content_defValues {
CType = list
list_type = sgnews_singleview
}
}
category {
iconIdentifier = sg_news-module
title = LLL:EXT:sg_news/Resources/Private/Language/locallang_backend.xlf:titleListByCategoryPlugin
......
# include the endless scrolling javascript code
page.includeJSFooterlibs {
sg_news_scrollbrowser = EXT:sg_news/Resources/Public/Scripts/ScrollBrowser.js
sg_news_tabs = EXT:sg_news/Resources/Public/Scripts/Tabs.js
sg_news_likes = EXT:sg_news/Resources/Public/Scripts/Likes.js
sg_news_scrollbrowser = EXT:sg_news/Resources/Public/JavaScript/ScrollBrowser.js
sg_news_tabs = EXT:sg_news/Resources/Public/JavaScript/Tabs.js
sg_news_likes = EXT:sg_news/Resources/Public/JavaScript/Likes.js
}
# news feed as own page type
......@@ -37,16 +37,6 @@ newsFeed {
}
}
[compatVersion = 7.6.0]
newsFeed.config.additionalHeaders >
newsFeed.config.additionalHeaders {
10 {
header = Content-type:text/xml
replace = 1
}
}
[global]
# news feed integration into the site
page.headerData {
273905123652 = TEXT
......
......@@ -23,35 +23,51 @@
</trans-unit>
<trans-unit id="titleLatestPlugin" approved="yes">
<source>Latest News</source>
<target>Letzte News</target>
<target>Neueste News</target>
</trans-unit>
<trans-unit id="titleListByCategoryPlugin" approved="yes">
<source>List News by Category/Tag</source>
<source>List News by Category/Tag.</source>
<target>Liste News aus Kategorien/Tags</target>
</trans-unit>
<trans-unit id="titleOverviewPlugin" approved="yes">
<source>News Overview</source>
<target>News-Übersicht</target>
<target>News Übersicht</target>
</trans-unit>
<trans-unit id="titleSingleViewPlugin" approved="yes">
<source>News Single View</source>
<target>News-Einzelansicht</target>
<target>News Einzelansicht</target>
</trans-unit>
<trans-unit id="descriptionLatestPlugin">
<source>Choose to show Latest News</source>
<target>Zeige die neuesten News </target>
<source>Show latest news.</source>
<target>Zeige die neuesten News.</target>
</trans-unit>
<trans-unit id="descriptionListByCategoryPlugin">
<source>List News by Category/Tag</source>
<target>Liste News aus Kategorien/Tags</target>
<source>List news by category/tag.</source>
<target>Eine Liste der News aus Kategorien/Tags.</target>
</trans-unit>
<trans-unit id="descriptionOverviewPlugin">
<source>Show an Overview of News</source>
<target>Überblick der News</target>
<source>Show an overview of all news.</source>
<target>Übersicht der News.</target>
</trans-unit>
<trans-unit id="descriptionSingleViewPlugin">
<source>Show a Single View of News</source>
<target>Zeige Einzelansicht der News</target>
<source>Show a single view of news.</source>
<target>Zeige eine Einzelansicht der News.</target>
</trans-unit>
<trans-unit id="pageTypeTitlePluginOverview.news">
<source>[News] News Overview</source>
<target>[News] News Übersicht</target>
</trans-unit>
<trans-unit id="pageTypeTitlePluginLatest.news">
<source>[News] News Latest</source>
<target>[News] Neueste News</target>
</trans-unit>
<trans-unit id="pageTypeTitlePluginCategory.news">
<source>[News] News by Category</source>
<target>[News] News aus Kategorien</target>
</trans-unit>
<trans-unit id="pageTypeTitlePluginSingle.news">
<source>[News] News Single View</source>
<target>[News] News Einzelansicht</target>
</trans-unit>
</body>
</file>
......
......@@ -69,6 +69,18 @@
<source><![CDATA[Use Image Cropping]]></source>
<target><![CDATA[Bild-Cropping aktivieren]]></target>
</trans-unit>
<trans-unit id="pages.title">
<source><![CDATA[Pagetitle (automatically generated from Last Update + Headline)]]></source>
<target><![CDATA[Seitentitel (automatisch generiert aus Letzte Aktualisierung + Schlagzeile)]]></target>
</trans-unit>
<trans-unit id="pages.subtitle">
<source><![CDATA[Headline]]></source>
<target><![CDATA[Schlagzeile]]></target>
</trans-unit>
<trans-unit id="pages.slug">
<source><![CDATA[URL Segment (generated from Pagetitle initially, has to be updated manually)]]></source>
<target><![CDATA[URL Segment (initial generiert aus Seitentitel, muss manuell aktualisiert werden)]]></target>
</trans-unit>
<trans-unit id="plugin.flexForm" approved="yes">
<source><![CDATA[Settings]]></source>
<target><![CDATA[Einstellungen]]></target>
......
......@@ -13,19 +13,19 @@
<source>Please upload an image first and save the form!</source>
</trans-unit>
<trans-unit id="pageTypeTitlePlugin.news">
<source>[SgNews] Plugins</source>
<source>[News] Plugins</source>
</trans-unit>
<trans-unit id="pageTypeTitlePluginOverview.news">
<source>[SgNews] News Overview</source>
<source>[News] News Overview</source>
</trans-unit>
<trans-unit id="pageTypeTitlePluginLatest.news">
<source>[SgNews] News Latest</source>
<source>[News] News Latest</source>
</trans-unit>
<trans-unit id="pageTypeTitlePluginCategory.news">
<source>[SgNews] News by Category</source>
<source>[News] News by Category</source>
</trans-unit>
<trans-unit id="pageTypeTitlePluginSingle.news">
<source>[SgNews] News Single View</source>
<source>[News] News Single View</source>
</trans-unit>
<trans-unit id="pageType.category">
<source>Category</source>
......@@ -37,10 +37,7 @@
<source>Latest News</source>
</trans-unit>
<trans-unit id="descriptionLatestPlugin">
<source>Choose to show Latest News</source>
</trans-unit>
<trans-unit id="descriptionLatestPlugin">
<source>Show most recent news</source>
<source>Show latest news.</source>
</trans-unit>
<trans-unit id="titleListByCategoryPlugin">
<source>News by Category/Tag</source>
......@@ -48,20 +45,17 @@
<trans-unit id="descriptionListByCategoryPlugin">
<source>List news by category/tag</source>
</trans-unit>
<trans-unit id="descriptionListByCategoryPlugin">
<source>List News by Category/Tag</source>
</trans-unit>
<trans-unit id="titleOverviewPlugin">
<source>News Overview</source>
</trans-unit>
<trans-unit id="descriptionOverviewPlugin">
<source>Show an overview of all news</source>
<source>Show an overview of all news.</source>
</trans-unit>
<trans-unit id="titleSingleViewPlugin">
<source>News Single View</source>
</trans-unit>
<trans-unit id="descriptionSingleViewPlugin">
<source>Show a single view of news</source>
<source>Show a single view of news.</source>
</trans-unit>
<trans-unit id="pageTitlePlugin.news">
<source>News</source>
......
......@@ -54,6 +54,15 @@
<trans-unit id="pages.tx_sgnews_use_image_crop">
<source><![CDATA[Use Image Cropping]]></source>
</trans-unit>
<trans-unit id="pages.title">
<source><![CDATA[Pagetitle (automatically generated from Last Update + Headline)]]></source>
</trans-unit>
<trans-unit id="pages.subtitle">
<source><![CDATA[Headline]]></source>
</trans-unit>
<trans-unit id="pages.slug">
<source><![CDATA[URL Segment (generated from Pagetitle initially, has to be updated manually)]]></source>
</trans-unit>
<trans-unit id="plugin.flexForm">
<source><![CDATA[Settings]]></source>
</trans-unit>
......
{namespace core = TYPO3\CMS\Core\ViewHelpers}
{namespace sg=SGalinski\SgNews\ViewHelpers}
<f:be.container enableClickMenu="FALSE" loadExtJs="FALSE"
<f:be.container
includeRequireJsModules="{
0: 'TYPO3/CMS/Backend/AjaxDataHandler',
1: '{f:if(condition: \'{typo3Version} < 8000000 \', then: \'TYPO3/CMS/Backend/ClickMenu\', else: \'TYPO3/CMS/Backend/ContextMenu\')}',
2: 'TYPO3/CMS/Backend/Tooltip',
2: 'TYPO3/CMS/Recordlist/Tooltip'}"
includeJsFiles="{0: '{f:uri.resource(path: \'Scripts/Backend.js\')}'}">
0: 'TYPO3/CMS/Backend/ContextMenu',
1: 'TYPO3/CMS/Backend/Tooltip',
2: 'TYPO3/CMS/SgNews/Backend'}">
<div class="module" data-module-id="" data-module-name="">
<div class="module-docheader t3js-module-docheader">
<div class="module-docheader-bar module-docheader-bar-navigation t3js-module-docheader-bar t3js-module-docheader-bar-navigation">
......@@ -21,7 +19,16 @@
</f:for>
</div>
<div class="module-docheader-bar-column-right">
<span class="typo3-docheader-pagePath"><f:translate key="LLL:EXT:lang/locallang_core.xlf:labels.path" />: <f:format.raw>{docHeader.metaInformation.path}</f:format.raw></span>
<span class="typo3-docheader-pagePath">
<f:if condition="{typo3Version} < 9000000">
<f:then>
<f:translate key="LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.path" />: <f:format.raw>{docHeader.metaInformation.path}</f:format.raw>
</f:then>
<f:else>
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.path" />: <f:format.raw>{docHeader.metaInformation.path}</f:format.raw>
</f:else>
</f:if>
</span>
<f:format.raw>{docHeader.metaInformation.recordInformation}</f:format.raw>
</div>
</div>
......
......@@ -17,9 +17,9 @@
<f:for each="{pages}" as="page">
<tr data-uid="{page.uid}">
<td nowrap="nowrap" class="col-title">
<a href="#" onclick="sgNewsGoToPage({page.uid}, '{page.path}'); return false;">
<f:link.action class="sg-news_pageswitch" action="index" additionalParams="{id: page.uid, returnUrl: returnUrl}" additionalAttributes="{data-page: page.uid, data-path: page.path}">
<sg:backend.recordIcon table="pages" row="{page}" clickMenu="0" /> {page._thePathFull}
</a>
</f:link.action>
</td>
</tr>
</f:for>
......@@ -27,4 +27,4 @@
</table>
</div>
</div>
</f:if>
\ No newline at end of file
</f:if>
......@@ -19,27 +19,29 @@
-->
</f:comment>
<f:alias map="{singleViewUri: '{f:uri.page(pageUid: \'{newsMetaData.news.uid}\')}'}">
<a href="{singleViewUri}">
<div class="tx-sgnews-single-header {f:if(condition: newsMetaData.imageObject, then: 'tx-sgnews-single-header-image')}">
<f:if condition="{newsMetaData.imageObject}">
<div class="tx-sgnews-single-image">
<picture>
<source media="(max-width: 1200px)"
srcset="{f:uri.image(src: newsMetaData.imageObject.uid, treatIdAsReference: '1', width: '1200c', height: '403c', cropVariant: 'small')}">
<f:image image="{newsMetaData.imageObject}" alt="" width="1845c"
height="619c" cropVariant="large"/>
</picture>
</div>
</f:if>
<div class="tx-sgnews-single-header-content">
<div class="tx-sgnews-teaser-title">
<h1>{newsMetaData.news.subtitleWithFallbackToTitle}</h1>
</div>
<div class="tx-sgnews-teaser">
<div class="tx-sgnews-teaser-inner">
<div class="tx-sgnews-teaser-meta">
<f:variable name="singleViewUri"><f:uri.page pageUid="{newsMetaData.news.uid}" /></f:variable>
<a href="{singleViewUri}">
<div class="tx-sgnews-single-header {f:if(condition: newsMetaData.imageObject, then: 'tx-sgnews-single-header-image')}">
<f:if condition="{newsMetaData.imageObject}">
<div class="tx-sgnews-single-image">
<picture>
<source media="(max-width: 1200px)"
srcset="{f:uri.image(src: newsMetaData.imageObject.uid, treatIdAsReference: '1', width: '1200c', height: '403c', cropVariant: 'small')}">
<f:image image="{newsMetaData.imageObject}" alt="" width="1845c"
height="619c" cropVariant="large"/>
</picture>
</div>
</f:if>
<div class="tx-sgnews-single-header-content">
<div class="tx-sgnews-teaser-title">
<h1>{newsMetaData.news.subtitleWithFallbackToTitle}</h1>
</div>
<div class="tx-sgnews-teaser">
<div class="tx-sgnews-teaser-inner">
<div class="tx-sgnews-teaser-meta">
<span class="author">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="#FFF" d="M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"/></svg>
<f:if condition="{newsMetaData.news.authorFrontendUser}">
<f:then>
<f:if condition="{newsMetaData.news.authorFrontendUser.www}">
......@@ -59,31 +61,34 @@
</f:if>
</span>
<f:if condition="{newsMetaData.news.location}">
<f:if condition="{newsMetaData.news.location}">
<span class="location">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="#FFF" d="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z"/></svg>
{newsMetaData.news.location}
</span>
</f:if>
</f:if>
<span class="date">
<span class="date">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#FFF" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm57.1 350.1L224.9 294c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v137.7l63.5 46.2c5.4 3.9 6.5 11.4 2.6 16.8l-28.2 38.8c-3.9 5.3-11.4 6.5-16.8 2.6z"/></svg>
<f:format.date format="{f:translate(key:'frontend.dateformat')}">{newsMetaData.news.lastUpdated}</f:format.date>
</span>
<span class="category">
{newsMetaData.category.subtitleWithFallbackToTitle}
</span>
<f:if condition="{newsMetaData.news.tags}">
<br />
<span class="tags">
<f:for each="{newsMetaData.news.tags}" as="tag" iteration="it">
{tag.title}<f:if condition="{it.isLast}"><f:else>, </f:else></f:if>
</f:for>
</span>
</f:if>
</div>
<span class="category">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#FFF" d="M0 252.118V48C0 21.49 21.49 0 48 0h204.118a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882L293.823 497.941c-18.745 18.745-49.137 18.745-67.882 0L14.059 286.059A48 48 0 0 1 0 252.118zM112 64c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z"/></svg>
{newsMetaData.category.subtitleWithFallbackToTitle}
</span>
<f:if condition="{newsMetaData.news.tags}">
<br />
<span class="tags">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="#FFF" d="M497.941 225.941L286.059 14.059A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v204.118a48 48 0 0 0 14.059 33.941l211.882 211.882c18.744 18.745 49.136 18.746 67.882 0l204.118-204.118c18.745-18.745 18.745-49.137 0-67.882zM112 160c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm513.941 133.823L421.823 497.941c-18.745 18.745-49.137 18.745-67.882 0l-.36-.36L527.64 323.522c16.999-16.999 26.36-39.6 26.36-63.64s-9.362-46.641-26.36-63.64L331.397 0h48.721a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882z"/></svg>
<f:for each="{newsMetaData.news.tags}" as="tag" iteration="it">
{tag.title}<f:if condition="{it.isLast}"><f:else>, </f:else></f:if>
</f:for>
</span>
</f:if>
</div>
</div>
</div>
</div>
</a>
</f:alias>
</div>
</a>
......@@ -25,12 +25,16 @@
<f:if condition="{newsMetaData -> f:count()} > 1">
<a class="left carousel-control" href="#carousel-latest-news" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" width="30" height="44">
<path fill="#FFF" d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"/>
</svg>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-latest-news" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" width="30" height="44">
<path fill="#FFF" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/>
</svg>
<span class="sr-only">Next</span>
</a>
</f:if>
......
......@@ -24,13 +24,13 @@
</f:else>
</f:if>
<sg:extendedIf condition="{enableLessPages}" and="{showLessPages}">
<f:if condition="{enableLessPages} && {showLessPages}">
<li>
<a href="{enableLessPagesLink}">
...
</a>
</li>
</sg:extendedIf>
</f:if>
<f:for each="{pageLinks}" as="pageLink">
<f:if condition="{pageLink.isCurrentPage}">
......@@ -54,13 +54,13 @@
</f:if>
</f:for>
<sg:extendedIf condition="{enableMorePages}" and="{showNextPages}">
<f:if condition="{enableMorePages} && {showNextPages}">
<li>
<a href="{enableMorePagesLink}">
...
</a>
</li>
</sg:extendedIf>
</f:if>
<f:if condition="{nextPageExist}">
<f:then>
......
<f:layout name="Default" />
{namespace base=SGalinski\ProjectBase\ViewHelpers}
{namespace sg=SGalinski\SgNews\ViewHelpers}
{namespace rx=Reelworx\RxShariff\ViewHelper}
<f:section name="main">
<f:if condition="{settings.publisher}">
......@@ -55,6 +55,7 @@
<div class="tx-sgnews-teaser-inner">
<div class="tx-sgnews-teaser-meta">
<span class="author">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="#FFF" d="M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"/></svg>
<f:if condition="{newsMetaData.news.authorFrontendUser}">
<f:then>
<f:if condition="{newsMetaData.news.authorFrontendUser.www}">
......@@ -75,15 +76,18 @@
</span>
<f:if condition="{newsMetaData.news.location}">
<span class="location">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="#FFF" d="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z"/></svg>
{newsMetaData.news.location}
</span>
</f:if>
<span class="date">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#FFF" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm57.1 350.1L224.9 294c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v137.7l63.5 46.2c5.4 3.9 6.5 11.4 2.6 16.8l-28.2 38.8c-3.9 5.3-11.4 6.5-16.8 2.6z"/></svg>
<f:format.date format="{f:translate(key:'frontend.dateformat')}">{newsMetaData.news.lastUpdated}</f:format.date>
</span>
<span class="category">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#FFF" d="M0 252.118V48C0 21.49 21.49 0 48 0h204.118a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882L293.823 497.941c-18.745 18.745-49.137 18.745-67.882 0L14.059 286.059A48 48 0 0 1 0 252.118zM112 64c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z"/></svg>
<a href="{f:uri.page(pageUid: '{newsMetaData.category.uid}')}">
{newsMetaData.category.subtitleWithFallbackToTitle}
</a>
......@@ -91,6 +95,7 @@
<f:if condition="{newsMetaData.news.tags}">
<br />
<span class="tags">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="#FFF" d="M497.941 225.941L286.059 14.059A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v204.118a48 48 0 0 0 14.059 33.941l211.882 211.882c18.744 18.745 49.136 18.746 67.882 0l204.118-204.118c18.745-18.745 18.745-49.137 0-67.882zM112 160c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm513.941 133.823L421.823 497.941c-18.745 18.745-49.137 18.745-67.882 0l-.36-.36L527.64 323.522c16.999-16.999 26.36-39.6 26.36-63.64s-9.362-46.641-26.36-63.64L331.397 0h48.721a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882z"/></svg>
<f:for each="{newsMetaData.news.tags}" as="tag" iteration="it">
{tag.title}<f:if condition="{it.isLast}"><f:else>, </f:else></f:if>
</f:for>
......@@ -125,7 +130,7 @@
<hr>
<div class="tx-sgnews-meta-bar">
<rx:shariff services="facebook,twitter,googleplus,whatsapp" enableBackend="true" />
<base:sharer />
<div class="tx-sgnews-likes" id="tx-sgnews-likes" data-uid="{newsMetaData.news.uid}">
<button class="tx-sgnews-like-buton btn btn-sm btn-info">
<span class="tx-sgnews-number-of-likes">
......@@ -163,10 +168,11 @@
<section class="content dark-bg">
<div class="container">
<div class="tx-sgnews-single-footer">
<sg:extendedIf condition="{previousNews}" or="{nextNews}">
<f:if condition="{previousNews} || {nextNews}">
<div class="tx-sgnews-single-footer-browser">
<f:if condition="{previousNews}">
<a href="{f:uri.page(pageUid: '{previousNews.uid}')}" class="btn btn-md btn-info tx-sgnews-footer-browser-previous">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#FFF" d="M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zM142.1 273l135.5 135.5c9.4 9.4 24.6 9.4 33.9 0l17-17c9.4-9.4 9.4-24.6 0-33.9L226.9 256l101.6-101.6c9.4-9.4 9.4-24.6 0-33.9l-17-17c-9.4-9.4-24.6-9.4-33.9 0L142.1 239c-9.4 9.4-9.4 24.6 0 34z"/></svg>
<f:translate key="frontend.singleview.previousArticle" />
</a>
</f:if>
......@@ -174,10 +180,11 @@
<f:if condition="{nextNews}">
<a href="{f:uri.page(pageUid: '{nextNews.uid}')}" class="btn btn-md btn-info tx-sgnews-footer-browser-next">
<f:translate key="frontend.singleview.nextArticle" />
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#FFF" d="M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zm113.9 231L234.4 103.5c-9.4-9.4-24.6-9.4-33.9 0l-17 17c-9.4 9.4-9.4 24.6 0 33.9L285.1 256 183.5 357.6c-9.4 9.4-9.4 24.6 0 33.9l17 17c9.4 9.4 24.6 9.4 33.9 0L369.9 273c9.4-9.4 9.4-24.6 0-34z"/></svg>
</a>
</f:if>
</div>
</sg:extendedIf>
</f:if>
</div>
</div>
</section>
......
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