Initial commit - Typo3 11.5.41
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
mod.wizards.newContentElement.wizardItems.common {
|
||||
elements {
|
||||
youtubevideo_pi1 {
|
||||
iconIdentifier = youtubevideo_icon
|
||||
title = YouTube Video
|
||||
description = YouTube video content element
|
||||
tt_content_defValues {
|
||||
CType = youtubevideo_pi1
|
||||
}
|
||||
}
|
||||
}
|
||||
show := addToList(youtubevideo_pi1)
|
||||
}
|
||||
TCEFORM.tt_content.tx_youtubevideo_ratio.addItems {
|
||||
0 = Widescreen (16:9)
|
||||
1 = Standard (4:3)
|
||||
}
|
||||
TCEFORM.tt_content.tx_youtubevideo_colcount.addItems {
|
||||
0 = 1
|
||||
2 = 2
|
||||
3 = 3
|
||||
4 = 4
|
||||
5 = 5
|
||||
6 = 6
|
||||
7 = 7
|
||||
8 = 8
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
<?php
|
||||
|
||||
$youtubeVideoColumns = array(
|
||||
'tx_youtubevideo_rel' => array (
|
||||
'exclude' => 1,
|
||||
'label' => 'LLL:EXT:youtubevideo/Resources/Private/Language/locallang_db.xlf:tx_youtubevideo_rel.title',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'default' => 1,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
]
|
||||
],
|
||||
]
|
||||
),
|
||||
'tx_youtubevideo_starttime' => array(
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:youtubevideo/Resources/Private/Language/locallang_db.xlf:tx_youtubevideo_starttime.title',
|
||||
'config' => array(
|
||||
'type' => 'input',
|
||||
'size' => '8',
|
||||
'eval' => 'trim,nospace,Brightside\Youtubevideo\Evaluation\HoursMinutesSeconds',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
),
|
||||
),
|
||||
'tx_youtubevideo_endtime' => array(
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:youtubevideo/Resources/Private/Language/locallang_db.xlf:tx_youtubevideo_endtime.title',
|
||||
'config' => array(
|
||||
'type' => 'input',
|
||||
'size' => '1',
|
||||
'eval' => 'trim,nospace,Brightside\Youtubevideo\Evaluation\HoursMinutesSeconds',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
),
|
||||
),
|
||||
'tx_youtubevideo_ratio' => array(
|
||||
'exclude' => 1,
|
||||
'label' => 'LLL:EXT:youtubevideo/Resources/Private/Language/locallang_db.xlf:tx_youtubevideo_ratio.title',
|
||||
'config' => array(
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['Widescreen (16:9)', 0],
|
||||
['Standard (4:3)', 1],
|
||||
],
|
||||
'size' => 1,
|
||||
'maxitems' => 1,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
]
|
||||
)
|
||||
),
|
||||
'tx_youtubevideo_mute' => array (
|
||||
'exclude' => 1,
|
||||
'label' => 'LLL:EXT:youtubevideo/Resources/Private/Language/locallang_db.xlf:tx_youtubevideo_mute.title',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
]
|
||||
],
|
||||
]
|
||||
),
|
||||
'tx_youtubevideo_fullscreen' => array (
|
||||
'exclude' => 1,
|
||||
'label' => 'LLL:EXT:youtubevideo/Resources/Private/Language/locallang_db.xlf:tx_youtubevideo_fullscreen.title',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'default' => 1,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => false,
|
||||
]
|
||||
],
|
||||
]
|
||||
),
|
||||
'tx_youtubevideo_loop' => array (
|
||||
'exclude' => 1,
|
||||
'label' => 'LLL:EXT:youtubevideo/Resources/Private/Language/locallang_db.xlf:tx_youtubevideo_loop.title',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
]
|
||||
],
|
||||
]
|
||||
),
|
||||
'tx_youtubevideo_coverimage' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'LLL:EXT:youtubevideo/Resources/Private/Language/locallang_db.xlf:tx_youtubevideo_cover.image',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'tx_youtubevideo_coverimage',
|
||||
[
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'columns' => [
|
||||
'crop' => [
|
||||
'config' => [
|
||||
'cropVariants' => [
|
||||
'widescreen' => [
|
||||
'title' => 'Widescreen (16:9)',
|
||||
'selectedRatio' => '16:9',
|
||||
'allowedAspectRatios' => [
|
||||
'16:9' => [
|
||||
'title' => 'Widescreen',
|
||||
'value' => 16 / 9,
|
||||
],
|
||||
],
|
||||
],
|
||||
'tv' => [
|
||||
'title' => 'Standard (4:3)',
|
||||
'selectedRatio' => '4:3',
|
||||
'allowedAspectRatios' => [
|
||||
'4:3' => [
|
||||
'title' => 'TV',
|
||||
'value' => 4 / 3,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'types' => [
|
||||
'0' => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
crop,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
|
||||
'sys_file_reference',
|
||||
$youtubeVideoColumns
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette(
|
||||
'sys_file_reference',
|
||||
'youtubevideoOverlayPalette',
|
||||
'title,description,
|
||||
--linebreak--,
|
||||
tx_youtubevideo_mute,tx_youtubevideo_loop,tx_youtubevideo_fullscreen,tx_youtubevideo_rel,
|
||||
--linebreak--,
|
||||
tx_youtubevideo_starttime,tx_youtubevideo_endtime,
|
||||
--linebreak--,
|
||||
tx_youtubevideo_ratio,
|
||||
--linebreak--,
|
||||
tx_youtubevideo_coverimage'
|
||||
);
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') || die('Access denied.');
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
|
||||
'youtubevideo', 'Configuration/TypoScript/', 'YouTube Video'
|
||||
);
|
||||
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') || die('Access denied.');
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['youtubevideo_pi1'] = 'youtubevideo_icon';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
|
||||
'tt_content', 'EXT:youtubevideo/Resources/Private/Language/locallang_db.xlf'
|
||||
);
|
||||
|
||||
// Get extension configuration
|
||||
$extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
|
||||
\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class
|
||||
);
|
||||
$extensionConfiguration = $extensionConfiguration->get('youtubevideo');
|
||||
|
||||
// Add to content type dropdown
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
"tt_content",
|
||||
"CType",
|
||||
[
|
||||
'YouTube Video',
|
||||
'youtubevideo_pi1',
|
||||
'youtubevideo_icon'
|
||||
],
|
||||
'textmedia',
|
||||
'after'
|
||||
);
|
||||
|
||||
$tempColumns = array(
|
||||
'tx_youtubevideo_assets' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Video',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('tx_youtubevideo_assets', [
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'Video',
|
||||
'showPossibleLocalizationRecords' => true,
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;youtubevideoOverlayPalette,
|
||||
--palette--;;filePalette',
|
||||
],
|
||||
],
|
||||
],
|
||||
], 'youtube'),
|
||||
],
|
||||
'tx_youtubevideo_colcount' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Columns',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => array(),
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
'tx_youtubevideo_titles' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Titles',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => true
|
||||
]
|
||||
],
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
'tx_youtubevideo_descriptions' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Descriptions',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
]
|
||||
],
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $tempColumns);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['youtubevideo_pi1']['showitem'] = '
|
||||
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
|
||||
--palette--;;general,
|
||||
--palette--;;headers,
|
||||
--palette--;LLL:EXT:youtubevideo/Resources/Private/Language/locallang_db.xlf:tx_youtubevideo.title;youtubevideoMain,
|
||||
--div--;LLL:EXT:youtubevideo/Resources/Private/Language/locallang_db.xlf:tx_youtubevideo.settings;,
|
||||
--palette--;LLL:EXT:youtubevideo/Resources/Private/Language/locallang_db.xlf:tx_youtubevideo.layout;youtubevideoLayout,
|
||||
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
|
||||
--palette--;;frames,
|
||||
--palette--;;appearanceLinks,
|
||||
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
|
||||
--palette--;;language,
|
||||
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
|
||||
--palette--;;hidden,
|
||||
--palette--;;access,
|
||||
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
|
||||
categories,
|
||||
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:notes,
|
||||
rowDescription,
|
||||
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
|
||||
';
|
||||
|
||||
if ($extensionConfiguration['youtubevideoEnablePagination']) {
|
||||
$GLOBALS['TCA']['tt_content']['types']['youtubevideo_pi1']['showitem'] = str_replace(
|
||||
';youtubevideoLayout,',
|
||||
';youtubevideoLayout,
|
||||
--palette--;LLL:EXT:paginatedprocessors/Resources/Private/Language/locallang_tca.xlf:palettes.pagination;paginatedprocessors,',
|
||||
$GLOBALS['TCA']['tt_content']['types']['youtubevideo_pi1']['showitem']
|
||||
);
|
||||
}
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['palettes']['youtubevideoMain']['showitem'] = 'tx_youtubevideo_assets';
|
||||
$GLOBALS['TCA']['tt_content']['palettes']['youtubevideoLayout']['showitem'] = '
|
||||
tx_youtubevideo_colcount,
|
||||
tx_youtubevideo_titles,
|
||||
tx_youtubevideo_descriptions,
|
||||
';
|
||||
|
||||
// Disable upload button in assets
|
||||
$GLOBALS['TCA']['tt_content']['columns']['tx_youtubevideo_assets']['config']['appearance']['fileUploadAllowed'] = 0;
|
||||
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['youtubevideo_pi1'] = 'youtubevideo_icon';
|
||||
@@ -0,0 +1,24 @@
|
||||
# cat=Youtubevideo/1; type=int+; label= Max width of the cover image in px
|
||||
youtubevideo.coverimagewidth = 1280
|
||||
# cat=Youtubevideo/1; type=boolean[1]; label= Disable Youtube logo in video
|
||||
youtubevideo.modestbranding = 0
|
||||
# cat=Youtubevideo/1; type=boolean[1]; label= Disable 'share' and 'watch later' links by using youtube-nocookie.com
|
||||
youtubevideo.nocookiehost = 0
|
||||
# cat=Youtubevideo/1; type=int+; label= Add class 'small' to the video container if outer container is narrower than this
|
||||
youtubevideo.breakpointSmall = 500
|
||||
# cat=Youtubevideo/1; type=int+; label= Add class 'tiny' to the video container if outer container is narrower than this
|
||||
youtubevideo.breakpointTiny = 300
|
||||
# cat=Youtubevideo/1; type=boolean[1]; label= Enable GDPR notification overlay after clicking 'play'
|
||||
youtubevideo.gdprnote = 1
|
||||
# cat=Youtubevideo/1; type=string; label= Override GDPR notification text
|
||||
youtubevideo.gdprtextoverride =
|
||||
# cat=Youtubevideo/youtubevideo; type=int+; label= Padding between images in % of outside container
|
||||
youtubevideo.colspacewidth = 1.5
|
||||
# cat=Youtubevideo/youtubevideo; type=boolean[1]; label= Iframe instead of API on demand, not GDPR friendly
|
||||
youtubevideo.iframe = 0
|
||||
# cat=Youtubevideo/1; type=string; label= Template root paths
|
||||
youtubevideo.templateRootPaths = EXT:youtubevideo/Resources/Private/Templates/
|
||||
# cat=Youtubevideo/1; type=string; label= Template root paths
|
||||
youtubevideo.partialRootPaths = EXT:youtubevideo/Resources/Private/Partials/
|
||||
# cat=Youtubevideo/1; type=string; label= CSS file path
|
||||
youtubevideo.cssPath = EXT:youtubevideo/Resources/Public/Styles/youtubevideo.css
|
||||
@@ -0,0 +1,92 @@
|
||||
page.includeCSS.youtubevideo = {$youtubevideo.cssPath}
|
||||
|
||||
# set JS constants for video container breakpoint classes
|
||||
page.jsFooterInline {
|
||||
10982311 = TEXT
|
||||
10982311.value (
|
||||
containerBreakpointSmall = {$youtubevideo.breakpointSmall};
|
||||
containerBreakpointTiny = {$youtubevideo.breakpointTiny};
|
||||
)
|
||||
}
|
||||
|
||||
tt_content {
|
||||
youtubevideo_pi1 =< lib.contentElement
|
||||
youtubevideo_pi1 {
|
||||
templateName = Youtubevideo
|
||||
templateName = TEXT
|
||||
# load iframe template if constant has been set
|
||||
templateName.stdWrap {
|
||||
cObject = TEXT
|
||||
cObject {
|
||||
value = YoutubevideoIframe
|
||||
if.isTrue = {$youtubevideo.iframe}
|
||||
}
|
||||
ifEmpty = Youtubevideo
|
||||
}
|
||||
|
||||
templateRootPaths.20909 = {$youtubevideo.templateRootPaths}
|
||||
partialRootPaths.20909 = {$youtubevideo.partialRootPaths}
|
||||
dataProcessing {
|
||||
10 = Brightside\Youtubevideo\DataProcessing\YoutubevideoFilesProcessor
|
||||
10 {
|
||||
pagination {
|
||||
isActive.field = tx_paginatedprocessors_paginationenabled
|
||||
uniqueId.field = uid
|
||||
uniqueId.override.field = tx_paginatedprocessors_urlsegment
|
||||
itemsPerPage = tx_paginatedprocessors_itemsperpage
|
||||
itemsPerPage.field = tx_paginatedprocessors_itemsperpage
|
||||
pageLinksShown = 5
|
||||
pageLinksShown.override.field = tx_paginatedprocessors_pagelinksshown
|
||||
anchorActive.field = tx_paginatedprocessors_anchor
|
||||
anchorId.field = uid
|
||||
anchorId.override.field = tx_paginatedprocessors_anchorid
|
||||
}
|
||||
}
|
||||
}
|
||||
# dataProcessing.10 = Brightside\Youtubevideo\DataProcessing\DatabaseCustomQueryProcessor
|
||||
settings {
|
||||
coverimagewidth = {$youtubevideo.coverimagewidth}
|
||||
colspacewidth = {$youtubevideo.colspacewidth}
|
||||
}
|
||||
variables {
|
||||
# language code use de, fr, et etc.
|
||||
hl = TEXT
|
||||
hl.data = siteLanguage:iso-639-1
|
||||
|
||||
# wide screen 16:9 value (math behind: 9 * 100 / 16 = 56.25)
|
||||
ratioDefault = TEXT
|
||||
ratioDefault.value = 56.25
|
||||
|
||||
# old screens 4:3 value (math behind: 3 * 100 / 4 = 75)
|
||||
ratio1 = TEXT
|
||||
ratio1.value = 75
|
||||
|
||||
modestbranding = TEXT
|
||||
modestbranding.value = {$youtubevideo.modestbranding}
|
||||
|
||||
nocookiehost = TEXT
|
||||
nocookiehost.value = {$youtubevideo.nocookiehost}
|
||||
|
||||
coverimagewidth = TEXT
|
||||
coverimagewidth.value = {$youtubevideo.coverimagewidth}
|
||||
|
||||
containerBreakpointSmall = TEXT
|
||||
containerBreakpointSmall.value = {$youtubevideo.breakpointSmall}
|
||||
|
||||
containerBreakpointTiny = TEXT
|
||||
containerBreakpointTiny.value = {$youtubevideo.breakpointTiny}
|
||||
|
||||
gdprnote = TEXT
|
||||
gdprnote.value = {$youtubevideo.gdprnote}
|
||||
|
||||
gdprtextoverride = TEXT
|
||||
gdprtextoverride.value = {$youtubevideo.gdprtextoverride}
|
||||
|
||||
colspacewidth = TEXT
|
||||
colspacewidth.value = {$youtubevideo.colspacewidth}
|
||||
|
||||
iframe = TEXT
|
||||
iframe.value = {$youtubevideo.iframe}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user