Initial commit - Typo3 11.5.41
This commit is contained in:
145
typo3conf/ext/youtubevideo/ChangeLog
Normal file
145
typo3conf/ext/youtubevideo/ChangeLog
Normal file
@@ -0,0 +1,145 @@
|
||||
* 0.1.0 Beta
|
||||
– Initial release
|
||||
* 0.2.0
|
||||
– Video caption added
|
||||
– Related video enable option
|
||||
– Show video info enable option
|
||||
– Autoplay enable option
|
||||
– Start time minutes and seconds input fields
|
||||
- TCA layout and collapsable settins panel
|
||||
– Customizable templateRootPath
|
||||
* 0.3.0
|
||||
– TYPO3 6.2 compatible only (not tested on earlier versions)
|
||||
* 0.3.1
|
||||
– Fixing dependency to 6.2 only
|
||||
* 0.4.0
|
||||
– Parsing YouTube video links
|
||||
* 0.4.1
|
||||
– addPageTSConfig moved to .ts configuration file
|
||||
– Compatibility update now works on TYPO3 6.0 – 6.2 LTS
|
||||
* 0.5.0
|
||||
– TSConfig configurable aspect ratio dropdown added to the video settings
|
||||
– Default wideo size changed to HD 16:9 in TypoScript setup.txt 720px x 405px
|
||||
– Removed INSTALL.txt
|
||||
* 0.5.1
|
||||
– Renaming preconfigured aspect ratio options to 'Widescreen (16:9)' and 'Standard (4:3)'
|
||||
– Setting extension icon as content type icon and tuning it up a bit
|
||||
* 0.5.2
|
||||
– Language file restructured and relocated
|
||||
– Content sensitive help added
|
||||
– YouTube URL field is mandatory now
|
||||
– Relocated PageTS config file
|
||||
* 0.5.3
|
||||
– Added 'Modestbranding' to reduce YouTube branding in videos
|
||||
* 0.5.4
|
||||
– page.includeJSFooter.youtubevideo changed to page.includeJSFooterlibs.fitvids in setup.txt
|
||||
* 0.6.0
|
||||
– fitVids.js removed completely as it was not working with all modern browsers. Pure CSS solution is used. Changes in setup.txt and Index.html template.
|
||||
* 0.7.0
|
||||
– TYPO3 6.2 tested
|
||||
– TYPO3 7.2 compatibility
|
||||
– HTTPS set as default in embed video template
|
||||
* 0.7.1
|
||||
– TYPO3 6.2 compatibility fix in version numbering
|
||||
* 0.7.2
|
||||
– Moving column definations to TCA
|
||||
– Sys categories functionality added
|
||||
– ext:gridelements compatibility
|
||||
* 0.7.3
|
||||
– Adding fullscreen disable and looping options
|
||||
– Better translations for video options
|
||||
* 0.7.4
|
||||
– Showing video and it's settings in back end page module
|
||||
* 0.7.5
|
||||
– Bug fixes and TYPO3 7.4 compatibility from Markus Klein
|
||||
* 0.7.6
|
||||
– TYPO3 7.5 compatibility
|
||||
* 0.7.7
|
||||
– TYPO3 7.6 compatibility
|
||||
– Updated icons ready but not in use
|
||||
– Moved under "Typical Page Content" in New content element wizard
|
||||
* 0.7.8
|
||||
– Palettes fix in TCA
|
||||
* 0.7.9
|
||||
– Updated icons for TYPO3 7.6
|
||||
* 0.8.0
|
||||
– TYPO3 6.2 use namespace bug fix
|
||||
* 0.9.0
|
||||
– TYPO3 8.3 compatibility
|
||||
– Content type icon fix in page module
|
||||
* 0.9.1
|
||||
– TYPO3 8.5 compatibility
|
||||
* 0.9.2
|
||||
– TYPO3 8.6 compatibility
|
||||
* 1.0.0
|
||||
– Dropping support for older than 8.5 TYPO3 versions
|
||||
– Supports fluid_styled_content only
|
||||
– Custom cover image support
|
||||
– Custom play button option
|
||||
– Base CSS file added
|
||||
– JavaScript API enabled and scripts for custom cover image and play button
|
||||
* 1.1.0
|
||||
– BREAKING CHANGES for custom templates: Need to modify content arrays {autoplay} to {data.tx_youtubevideo_autoplay} and so on.
|
||||
– DataProcessing instead of controller
|
||||
– Cover image title and description as image overlay text
|
||||
* 1.2.0
|
||||
– Bug fix for playing multiple videos with cover image on same page
|
||||
– Improved mobile template
|
||||
– Custom play button and cover image fetching from youtube turned on by default in TypoScript
|
||||
– Dedicated cover title and text fields
|
||||
* 1.2.1
|
||||
– jQuery based breakpoints for cover text and play button location styles depending on video container width
|
||||
– Checking available maxres cover image size and fall back to smaller if not present
|
||||
– Inline SVG custom play button and CSS controlled colors
|
||||
– Constant editor
|
||||
– Show cover title and text in back end preview besides the video
|
||||
* 1.2.2
|
||||
– Easier to style and change play button, cover image moved to Partials
|
||||
– Play button colour change compatible with ext:microtemplate
|
||||
* 1.2.3
|
||||
– Composer package added, repo moved to github
|
||||
– README.rst added
|
||||
* 1.3.0
|
||||
– TYPO3 9.5 compatible only
|
||||
– Showinfo removed as deprecated in youtube
|
||||
– Add mute parameter if autoplay is on
|
||||
– Rename .ts to .typoscript
|
||||
- Automatically set language by the site configuration
|
||||
- Add breakpoint with vanilla JS if desired, set the constant, jQuery is still default
|
||||
- BREAKING!!! – For custom templates and partials! Change render values to variables in TS setup, partials and templates.
|
||||
- BREAKING!!! – Custom play button is NOT enabled by default any more. Changed in TS constants. Custom play button and cover makes the users click twice to play the video in some browsers.
|
||||
* 1.3.1
|
||||
– Adding mute if cover image or text is active. Chrome wouldn't play video without it.
|
||||
- Fix cover image conflict with image fields in other content types
|
||||
* 1.4.0
|
||||
– TYPO3 10 LTS support
|
||||
* 1.4.1
|
||||
– MySQL strict mode support for start minute and second field, thanks @tgaertner
|
||||
* 1.4.2
|
||||
– TYPO3 11 compatibility
|
||||
– Language file from XML to XLF
|
||||
* 1.4.3
|
||||
– README to md format
|
||||
– Move ext icons to Resources/Public
|
||||
* 2.0.0
|
||||
- !!! BREAKING !!! 90% REWRITE NOT COMPATIBLE WITH PREVIOUS VERSIONS
|
||||
- Use TYPO3 YouTube video files
|
||||
- Video options saved into sys_file_reference
|
||||
- Multiple videos per content element
|
||||
- Gallery layout
|
||||
- Pagination with t3brightside/paginatedprocessors
|
||||
- Load YouTube API on play
|
||||
- Javascript loaded only if Youtubecontent is present on the page
|
||||
- GDPR friendly and ask for consent before playing
|
||||
- Simple non GDPR friendly iframe template available, with no cover image option
|
||||
- Option to disable back end player in extension configuration
|
||||
– Option to disable pagination in extension configuration
|
||||
* 2.0.1
|
||||
- Enable TYPO3 10.4 in composer mode
|
||||
- Fix the option to disable GDPR note
|
||||
- Set videoWrapper default height to 0 not to have unexpected height changes with third party GDPR extensions
|
||||
* 2.1.0
|
||||
- Enable language sync for the fields
|
||||
- Fix translation handling in YoutubevideoFilesProcessor
|
||||
* 2.1.1
|
||||
- [BUGFIX] Eliminate undefined array key warnings
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
namespace Brightside\Youtubevideo\DataProcessing;
|
||||
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
use TYPO3\CMS\Frontend\DataProcessing\FilesProcessor;
|
||||
use TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\OnlineMediaHelperRegistry;
|
||||
use Brightside\Paginatedprocessors\Processing\DataToPaginatedData;
|
||||
|
||||
class YoutubevideoFilesProcessor extends FilesProcessor
|
||||
{
|
||||
public function process(
|
||||
ContentObjectRenderer $cObj,
|
||||
array $contentObjectConfiguration,
|
||||
array $processorConfiguration,
|
||||
array $processedData
|
||||
) {
|
||||
$allProcessedData = parent::process($cObj, $contentObjectConfiguration, $processorConfiguration, $processedData);
|
||||
|
||||
// Get youtube files from content element
|
||||
$fileRepository = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\FileRepository::class);
|
||||
|
||||
if (isset($cObj->data['_LOCALIZED_UID'])) {
|
||||
$youtubeObjects = $fileRepository->findByRelation('tt_content', 'tx_youtubevideo_assets', $cObj->data['_LOCALIZED_UID']);
|
||||
} else {
|
||||
$youtubeObjects = $fileRepository->findByRelation('tt_content', 'tx_youtubevideo_assets', $cObj->data['uid']);
|
||||
}
|
||||
// Loop throguh files to get data and vover image relations
|
||||
foreach ($youtubeObjects as $video) {
|
||||
$previewImageObjects = $fileRepository->findByRelation('sys_file_reference', 'tx_youtubevideo_coverimage', $video->getUid());
|
||||
|
||||
// Get the original cover image and title
|
||||
$originalvideo = $video->getOriginalFile();
|
||||
$helper = OnlineMediaHelperRegistry::getInstance()->getOnlineMediaHelper($originalvideo);
|
||||
$previewFileName = $helper->getPreviewImage($originalvideo);
|
||||
$original = array(
|
||||
'title' => $originalvideo->getProperty('title'),
|
||||
'preview' => $helper->getPreviewImage($originalvideo),
|
||||
);
|
||||
|
||||
// Get start and end time and convert it to seconds
|
||||
if($video->getProperty('tx_youtubevideo_starttime')) {
|
||||
$starttime = explode(':', strval($video->getProperty('tx_youtubevideo_starttime')));
|
||||
$start = ((int)$starttime[0] * 3600) + ((int)$starttime[1] * 60) + (int)$starttime[2];
|
||||
} else {
|
||||
$start = 0;
|
||||
}
|
||||
if($video->getProperty('tx_youtubevideo_endtime')) {
|
||||
$endtime = explode(':', strval($video->getProperty('tx_youtubevideo_endtime')));
|
||||
$end = ((int)$endtime[0] * 3600) + ((int)$endtime[1] * 60) + (int)$endtime[2];
|
||||
} else {
|
||||
$end = 0;
|
||||
}
|
||||
// Get video settings
|
||||
$settings = array(
|
||||
'loop' => $video->getProperty('tx_youtubevideo_loop'),
|
||||
'mute' => $video->getProperty('tx_youtubevideo_mute'),
|
||||
'start' => $start,
|
||||
'end' => $end,
|
||||
'fullscreen' => $video->getProperty('tx_youtubevideo_fullscreen'),
|
||||
'ratio' => $video->getProperty('tx_youtubevideo_ratio'),
|
||||
'rel' => $video->getProperty('tx_youtubevideo_rel'),
|
||||
);
|
||||
|
||||
// Get custom cover image
|
||||
$coverImages = array();
|
||||
foreach ($previewImageObjects as $image) {
|
||||
$coverImages[] = $image;
|
||||
}
|
||||
|
||||
// Create video array
|
||||
$youtubeVideos[] = array(
|
||||
'video' => $video,
|
||||
'original' => $original,
|
||||
'settings' => $settings,
|
||||
'coverimages' => $coverImages
|
||||
);
|
||||
}
|
||||
|
||||
$allProcessedData['youtubevideos'] = $youtubeVideos;
|
||||
|
||||
// Paginate with 'paginatedprocessors' extension
|
||||
$paginationSettings = $processorConfiguration['pagination.'];
|
||||
if ((int)($cObj->stdWrapValue('isActive', $paginationSettings ?? []))) {
|
||||
$paginatedData = new DataToPaginatedData();
|
||||
$allProcessedData = $paginatedData->getPaginatedData(
|
||||
$cObj,
|
||||
$contentObjectConfiguration,
|
||||
$processorConfiguration,
|
||||
$allProcessedData,
|
||||
$allProcessedData['youtubevideos'],
|
||||
'youtubevideos'
|
||||
);
|
||||
return $allProcessedData;
|
||||
} else {
|
||||
return $allProcessedData;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
namespace Brightside\Youtubevideo\Evaluation;
|
||||
|
||||
/**
|
||||
* Class for field value validation/evaluation to be used in 'eval' of TCA
|
||||
*/
|
||||
class HoursMinutesSeconds
|
||||
{
|
||||
|
||||
/**
|
||||
* JavaScript code for client side validation/evaluation
|
||||
*
|
||||
* @return string JavaScript code for client side validation/evaluation
|
||||
*/
|
||||
public function returnFieldJS()
|
||||
{
|
||||
return "
|
||||
var value = value.replace(/[-|_|,|.|–|']+/g,':');
|
||||
var value = value.replace(/[^\d:]+/g,'');
|
||||
var value = value.replace(/^:|:$/g, '');
|
||||
var p = value.split(':'),
|
||||
s = 0, m = 1;
|
||||
while (p.length > 0) {
|
||||
s += m * parseInt(p.pop(), 10);
|
||||
m *= 60;
|
||||
}
|
||||
if (s > 0) {
|
||||
var date = new Date(0);
|
||||
date.setSeconds(s);
|
||||
var value = date.toISOString().substr(11, 8);
|
||||
return value;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
namespace Brightside\Youtubevideo\Hooks\PageLayoutView;
|
||||
|
||||
use \TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface;
|
||||
use \TYPO3\CMS\Backend\View\PageLayoutView;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\OnlineMediaHelperRegistry;
|
||||
use TYPO3\CMS\Core\Core\Environment;
|
||||
|
||||
class YoutubevideoContentElementPreviewRenderer implements PageLayoutViewDrawItemHookInterface {
|
||||
/**
|
||||
* Preprocesses the preview rendering of a content element of type "youtubemedia_pi1"
|
||||
*
|
||||
* @param \TYPO3\CMS\Backend\View\PageLayoutView $parentObject Calling parent object
|
||||
* @param bool $drawItem Whether to draw the item using the default functionality
|
||||
* @param string $headerContent Header content
|
||||
* @param string $itemContent Item content
|
||||
* @param array $row Record row of tt_content
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
public function preProcess(
|
||||
PageLayoutView &$parentObject,
|
||||
&$drawItem,
|
||||
&$headerContent,
|
||||
&$itemContent,
|
||||
array &$row
|
||||
) {
|
||||
|
||||
// Get extension configuration
|
||||
$extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
|
||||
\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class
|
||||
);
|
||||
$extensionConfiguration = $extensionConfiguration->get('youtubevideo');
|
||||
|
||||
if ($row['CType'] === 'youtubevideo_pi1') {
|
||||
$videoRelations = $parentObject->renderText($row['uid']);
|
||||
$youtubeObjects = \TYPO3\CMS\Backend\Utility\BackendUtility::resolveFileReferences('tt_content', 'tx_youtubevideo_assets', $row);
|
||||
$itemContent .= '<div class="youtubevideo-container">';
|
||||
foreach ($youtubeObjects as $video) {
|
||||
$original = $video->getOriginalFile();
|
||||
$code = $video->getContents();
|
||||
$onlineMediaHelper = OnlineMediaHelperRegistry::getInstance()->getOnlineMediaHelper($original);
|
||||
$previewUrl = str_replace(Environment::getPublicPath(), '', $onlineMediaHelper->getPreviewImage($original));
|
||||
if (!$video->getProperty('hidden')){
|
||||
$itemContent .= '<div class="youtubevideo-item">';
|
||||
if ($extensionConfiguration['youtubevideoEnableBePlayer']) {
|
||||
$itemContent .= '<div class="youtubevideo-wrapper"><iframe src="https://www.youtube.com/embed/';
|
||||
$itemContent .= $code;
|
||||
$itemContent .= '?showinfo=0&rel=0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>';
|
||||
} else {
|
||||
$itemContent .= $parentObject->linkEditContent('<img src="' . $previewUrl . '" />', $row);
|
||||
}
|
||||
if ($video->getProperty('title')){
|
||||
$itemContent .= '<b class="title">' . $parentObject->linkEditContent($parentObject->renderText($video->getProperty('title')), $row) . '</b>';
|
||||
}
|
||||
$itemContent .= '<ul>';
|
||||
if ($video->getProperty('tx_youtubevideo_mute')){
|
||||
$itemContent .= '<li>' . $parentObject->linkEditContent('Mute: on', $row) . '</li>';
|
||||
}
|
||||
if ($video->getProperty('tx_youtubevideo_loop')){
|
||||
$itemContent .= '<li>' . $parentObject->linkEditContent('Loop: on', $row) . '</li>';
|
||||
}
|
||||
if (!$video->getProperty('tx_youtubevideo_fullscreen')){
|
||||
$itemContent .= '<li>' . $parentObject->linkEditContent('Fullscreen: off', $row) . '</li>';
|
||||
}
|
||||
if (!$video->getProperty('tx_youtubevideo_rel')){
|
||||
$itemContent .= '<li>' . $parentObject->linkEditContent('Related: off', $row) . '</li>';
|
||||
}
|
||||
if ($video->getProperty('tx_youtubevideo_starttime')){
|
||||
$itemContent .= '<li>' . $parentObject->linkEditContent('Start: ' . $video->getProperty('tx_youtubevideo_starttime') , $row) . '</li>';
|
||||
}
|
||||
if ($video->getProperty('tx_youtubevideo_endtime')){
|
||||
$itemContent .= '<li>' . $parentObject->linkEditContent('End: ' . $video->getProperty('tx_youtubevideo_endtime') , $row) . '</li>';
|
||||
}
|
||||
$itemContent .= '</ul></div>';
|
||||
}
|
||||
}
|
||||
$itemContent .= '</div>';
|
||||
if (
|
||||
$row['tx_youtubevideo_colcount'] ||
|
||||
$row['tx_paginatedprocessors_paginationenabled'] ||
|
||||
$row['tx_paginatedprocessors_itemsperpage'] ||
|
||||
$row['tx_paginatedprocessors_pagelinksshown'] ||
|
||||
$row['tx_paginatedprocessors_pagelinksshown']
|
||||
) {
|
||||
$itemContent .= '<div class="settings">';
|
||||
if ($row['tx_youtubevideo_colcount']) {
|
||||
$itemContent .= '<br /><b>Layout:</b> columns:' . $parentObject->linkEditContent($parentObject->renderText($row['tx_youtubevideo_colcount']), $row) . '';
|
||||
}
|
||||
if ($row['tx_paginatedprocessors_paginationenabled']) {
|
||||
$itemContent .= '<br /><b> Pagination:</b> active ';
|
||||
if ($row['tx_paginatedprocessors_itemsperpage']) {
|
||||
$itemContent .= ' • items per page: ' . $row['tx_paginatedprocessors_itemsperpage'];
|
||||
}
|
||||
if ($row['tx_paginatedprocessors_pagelinksshown']) {
|
||||
$itemContent .= ' • links shown: ' . $row['tx_paginatedprocessors_pagelinksshown'];
|
||||
}
|
||||
if ($row['tx_paginatedprocessors_urlsegment']) {
|
||||
$itemContent .= ' • url segment: ' . $row['tx_paginatedprocessors_urlsegment'];
|
||||
}
|
||||
}
|
||||
$itemContent .= '</div>';
|
||||
}
|
||||
$drawItem = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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}
|
||||
}
|
||||
}
|
||||
}
|
||||
345
typo3conf/ext/youtubevideo/LICENSE.txt
Normal file
345
typo3conf/ext/youtubevideo/LICENSE.txt
Normal file
@@ -0,0 +1,345 @@
|
||||
Some icons used in the TYPO3 project are retrieved from the "Silk" icon set of
|
||||
Mark James, which can be found at http://famfamfam.com/lab/icons/silk/. This
|
||||
set is distributed under a Creative Commons Attribution 2.5 License. The
|
||||
license can be found at http://creativecommons.org/licenses/by/2.5/.
|
||||
---------------------------------
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
65
typo3conf/ext/youtubevideo/README.md
Normal file
65
typo3conf/ext/youtubevideo/README.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# Youtubevideo
|
||||
[](LICENSE.txt)
|
||||
[](https://packagist.org/packages/t3brightside/youtubevideo)
|
||||
[](https://packagist.org/packages/t3brightside/youtubevideo)
|
||||
[](https://t3brightside.com)
|
||||
|
||||
|
||||
**TYPO3 CMS extension for YouTube video content with custom cover images, gallery layout and backend previews.**
|
||||
|
||||
**[Demo](https://microtemplate.t3brightside.com)**
|
||||
|
||||
## !!! Important
|
||||
Version 2.0.0 is not compatible with older versions of the extension. There is no upgrade wizard – you're welcome to add one :)
|
||||
|
||||
## System requirements
|
||||
|
||||
- TYPO3
|
||||
- fluid_styled_content
|
||||
|
||||
## Features
|
||||
- Load Youtube API on play
|
||||
- Cover image optimisation
|
||||
- Gallery layout with column selection
|
||||
- Turn on/off titles and descriptions
|
||||
- Regular iframe option that's not GDPR friendly
|
||||
- Pagination
|
||||
- Dark mode styling
|
||||
|
||||
### Video options available:
|
||||
- title
|
||||
- description
|
||||
- mute
|
||||
- fullscreen
|
||||
- related
|
||||
- start & end time
|
||||
- aspect ratio (widescreen & standard)
|
||||
- custom cover image
|
||||
|
||||
### GDPR compliance
|
||||
- No external media or cookies loaded before clicking 'Accept & Play'
|
||||
- No intrusive GDPR notification before actually clicking on the video
|
||||
- Accept cookies to current or all videos on the domain
|
||||
- Concent cookie: youtubevideo-consent=1
|
||||
|
||||
## Installation
|
||||
- `composer req t3brightside/youtubevideo` or from TYPO3 extension repository [youtubevideo](https://extensions.typo3.org/extension/youtubevideo/)
|
||||
- Include static template
|
||||
- Alter the TypoScript constants if needed
|
||||
- Install [paginatedprocessors](https://github.com/t3brightside/paginatedprocessors) for pagination
|
||||
- Extension Configuration: Back end player (default: enabled)
|
||||
- Extension Configuration: Pagination features (default: disabled)
|
||||
|
||||
## Usage
|
||||
|
||||
Add as any other content element.
|
||||
|
||||
## Sources
|
||||
|
||||
- [GitHub](https://github.com/t3brightside/youtubevideo)
|
||||
- [Packagist](https://packagist.org/packages/t3brightside/youtubevideo)
|
||||
- [TER](https://extensions.typo3.org/extension/youtubevideo/)
|
||||
|
||||
## Development and maintenance
|
||||
|
||||
[Brightside OÜ – TYPO3 development and hosting specialised web agency](https://t3brightside.com)
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2021-11-04T17:54:12Z" product-name="paginatedprocessors">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="gdpr-text">
|
||||
<target state="translated">Wenn Sie das Video abspielen, sendet YouTube Ihnen einige Cookies!</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="gdpr-consent">
|
||||
<target>Accept & Play</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="gdpr-consentall">
|
||||
<target>Accept for All Videos & Play</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="gdpr-cancel">
|
||||
<target>Cancel</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" target-language="et" datatype="plaintext" original="messages" date="2021-11-04T17:54:12Z" product-name="paginatedprocessors">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="gdpr-text">
|
||||
<target state="translated">Video käivitamisel laetakse väline meedia ja YouTube teile küpsiseid!</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="gdpr-consent">
|
||||
<target>Nõustu ja vaata</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="gdpr-consentall">
|
||||
<target>Nõustu ka edaspidi ja vaata</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="gdpr-cancel">
|
||||
<target>Loobu</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2020-02-23T18:12:17Z"
|
||||
product-name="content_slug">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="gdpr-text">
|
||||
<source>On 'Play' external media is loaded and YouTube sends you some cookies!</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="gdpr-consent">
|
||||
<source>Accept & Play</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="gdpr-consentall">
|
||||
<source>Accept for All Videos & Play</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="gdpr-cancel">
|
||||
<source>Cancel</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2020-02-23T18:12:17Z"
|
||||
product-name="content_slug">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tt_content.tx_content_slug_fragment">
|
||||
<source>Human-readable URL #anchor</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo.title">
|
||||
<source>YouTube Video</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo.settings">
|
||||
<source>Settings</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo.layout">
|
||||
<source>Layout</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo.cover">
|
||||
<source>Video Cover</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_caption.title">
|
||||
<source>Description (Caption)</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_caption.description">
|
||||
<source>Usually the description of the video content in few words.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_ratio.title">
|
||||
<source>Aspect Ratio</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_ratio.description">
|
||||
<source>Changes video width and height ratio.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_autoplay.title">
|
||||
<source>Autoplay</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_autoplay.description">
|
||||
<source>Starts video playback automatically on page load.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_showinfo.title">
|
||||
<source>Video Info</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_showinfo.description">
|
||||
<source>Shows information (title, etc.) from YouTube.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_rel.title">
|
||||
<source>Related Videos</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_rel.description">
|
||||
<source>Shows related videos from YouTube at the end of the video.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_starttime.title">
|
||||
<source>Start Time (hh:mm:ss)</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_starttime.description">
|
||||
<source>Starts video at this minute.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_endtime.title">
|
||||
<source>End Time (hh:mm:ss)</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_endtime.description">
|
||||
<source>Starts video at this minute.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_fullscreen.title">
|
||||
<source>Fullscreen</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_fullscreen.description">
|
||||
<source>Disables and enables fullscreen option.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_mute.title">
|
||||
<source>Mute</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_mute.description">
|
||||
<source>Video starts playing with the sound turned off.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_loop.title">
|
||||
<source>Loop</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_loop.description">
|
||||
<source>Sets looping on and off.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo.enable">
|
||||
<source>Enable</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo.disable">
|
||||
<source>Disable</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_covertitle.title">
|
||||
<source>Cover Title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_covertitle.description">
|
||||
<source>Title shown over cover image.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_covertext.title">
|
||||
<source>Cover Text</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_covertext.description">
|
||||
<source>Text shown over cover image under the title.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_youtubevideo_cover.image">
|
||||
<source>Custom Cover</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -0,0 +1,17 @@
|
||||
<div class="youtubevideo {f:if(condition: data.tx_youtubevideo_colcount, then: 'item')}" style="{f:if(condition: data.tx_youtubevideo_colcount, then: 'width: {itemWidth}%')}">
|
||||
<div class="videoWrapper v{data.uid}" style="padding-bottom:<f:if condition="{item.settings.ratio} == 0">{ratioDefault}%</f:if><f:if condition="{item.settings.ratio} == 1">{ratio1}%</f:if>;">
|
||||
<iframe
|
||||
src="https://www.youtube.com/embed/
|
||||
{item.video.contents}
|
||||
{f:if(condition: item.settings.fullscreen, then: '?fs=1', else:'?fs=0')}
|
||||
{f:if(condition: item.settings.loop, then: '&loop=1')}
|
||||
{f:if(condition: item.settings.loop, then: '&playlist={item.video.contents}')}
|
||||
{f:if(condition: item.settings.start, then: '&start={item.settings.start}')}
|
||||
{f:if(condition: item.settings.end, then: '&end={item.settings.end}')}
|
||||
{f:if(condition: item.settings.rel, then: '&rel=1', else: '&rel=0')}
|
||||
{f:if(condition: item.settings.mute, then: '&mute=1', else: '&mute=0')}
|
||||
{f:if(condition: hl, then: '&hl={hl}')}
|
||||
{f:if(condition: modestbranding, then: '&modestbranding={modestbranding}')}">
|
||||
</iframe>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,78 @@
|
||||
<div class="youtubevideo {f:if(condition: data.tx_youtubevideo_colcount, then: 'item')}" style="{f:if(condition: data.tx_youtubevideo_colcount, then: 'width: {itemWidth}%')}">
|
||||
<div class="videoWrapper v{data.uid} <f:if condition="{item.coverimages.0}">coverimaged autoplay{item.video.autoplay}</f:if>"
|
||||
style="padding-bottom:<f:if condition="{item.settings.ratio} == 0">{ratioDefault}%</f:if><f:if condition="{item.settings.ratio} == 1">{ratio1}%</f:if>;
|
||||
">
|
||||
<div id="player-{item.video.uid}"></div>
|
||||
<a
|
||||
id="coverimage-{item.video.uid}"
|
||||
class="coverimage-click"
|
||||
data-yt-code="{item.video.contents}"
|
||||
data-yt-host="{f:if(condition: nocookiehost, then: 'https://www.youtube-nocookie.com', else: 'https://www.youtube.com')}"
|
||||
data-yt-id="player-{item.video.uid}"
|
||||
data-yt-uid="{item.video.uid}"
|
||||
data-yt-vars="
|
||||
"playsinline": 1,
|
||||
{f:if(condition: item.settings.fullscreen, then: '"fs": 1,', else:'"fs": 0,')}
|
||||
{f:if(condition: item.settings.loop, then: '"loop": 1,')}
|
||||
{f:if(condition: item.settings.loop, then: '"playlist": "{item.video.contents}",')}
|
||||
{f:if(condition: item.settings.start, then: '"start": {item.settings.start},')}
|
||||
{f:if(condition: item.settings.end, then: '"end": {item.settings.end},')}
|
||||
{f:if(condition: item.settings.rel, then: '"rel": 1,', else: '"rel": 0,')}
|
||||
{f:if(condition: item.settings.mute, then: '"mute": 1,', else: '"mute": 0,')}
|
||||
{f:if(condition: hl, then: '"hl": "{hl}",')}
|
||||
{f:if(condition: modestbranding, then: '"modestbranding": {modestbranding},')}
|
||||
"
|
||||
onclick="coverimageClick();
|
||||
"></a>
|
||||
<div
|
||||
class="coverimage"
|
||||
style="background:url(
|
||||
<f:if condition="{item.coverimages.0}">
|
||||
<f:then>
|
||||
<f:uri.image
|
||||
src="{item.coverimages.0.uid}"
|
||||
treatIdAsReference="1"
|
||||
width="{coverImageWidth_x2}"
|
||||
cropVariant="{f:if(condition: item.settings.ratio, then: 'tv', else: 'widescreen')}"
|
||||
/>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:uri.image src="{item.original.preview}" width="{coverImageWidth_x2}" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
) center center no-repeat; background-size: cover;">
|
||||
<f:if condition="{item.video.title} && !{data.tx_youtubevideo_titles} || {item.video.description} && {data.tx_youtubevideo_descriptions}">
|
||||
<div class="covertext">
|
||||
<f:if condition="{item.video.title} && !{data.tx_youtubevideo_titles} "><h2>{item.video.title}</h2><br /></f:if>
|
||||
<f:if condition="{item.video.description} && {data.tx_youtubevideo_descriptions}"><p>{item.video.description}</p></f:if>
|
||||
</div>
|
||||
</f:if>
|
||||
<f:render section="playbutton" />
|
||||
</div>
|
||||
</div>
|
||||
<f:render section="GdprOverlay" arguments="{_all}" />
|
||||
</div>
|
||||
|
||||
<f:section name="playbutton">
|
||||
<svg class="playbutton" height="100%" version="1.1" viewBox="0 0 68 48" width="100%"><path class="ytp-large-play-button-bg" d="M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z" fill="rgba(0,0,0,0.75)"></path><path d="M 45,24 27,14 27,34" fill="#fff"></path></svg>
|
||||
</f:section>
|
||||
|
||||
<f:section name="GdprOverlay">
|
||||
<div class="youtubevideo-gdpr-overlay " id="gdpr-{item.video.uid}">
|
||||
<div class="youtubevideo-gdpr-text">
|
||||
<div class="youtubevideo-gdpr-note">
|
||||
<f:if condition="{gdprtextoverride}">
|
||||
<f:then>
|
||||
{gdprtextoverride}
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:translate key="gdpr-text" extensionName="youtubevideo" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</div>
|
||||
<a class="youtubevideo-gdpr-button" data-yt-uid="{item.video.uid}" href="javascript:void(0)" onclick="gdprAgreeOnce();"><f:translate key="gdpr-consent" extensionName="youtubevideo" /></a>
|
||||
<a class="youtubevideo-gdpr-button" data-yt-uid="{item.video.uid}" href="javascript:void(0)" onclick="gdprAgree();"><f:translate key="gdpr-consentall" extensionName="youtubevideo" /></a><br />
|
||||
</div>
|
||||
<a class="youtubevideo-gdpr-cancel" data-yt-uid="{item.video.uid}" href="javascript:void(0)" onclick="gdprCancel();">×</a>
|
||||
</div>
|
||||
</f:section>
|
||||
@@ -0,0 +1,48 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<f:section name="HeaderAssets">
|
||||
<link rel="preconnect" href="https://www.youtube-nocookie.com">
|
||||
<link rel="preconnect" href="https://www.youtube.com">
|
||||
<link rel="preconnect" href="https://i.ytimg.com">
|
||||
<link rel="preconnect" href="https://i9.ytimg.com">
|
||||
<link rel="preconnect" href="https://s.ytimg.com">
|
||||
</f:section>
|
||||
<f:layout name="Default" />
|
||||
<f:section name="Main">
|
||||
<f:if condition="{youtubevideos -> f:count()} < {data.tx_youtubevideo_colcount}">
|
||||
<f:then><f:variable name="colCount">{youtubevideos -> f:count()}</f:variable></f:then>
|
||||
<f:else><f:variable name="colCount">{data.tx_youtubevideo_colcount}</f:variable></f:else>
|
||||
</f:if>
|
||||
|
||||
<f:variable name="spaceWidthTotal">{colCount - 1 * settings.colspacewidth}</f:variable>
|
||||
<f:variable name="itemWidth">{100 - spaceWidthTotal / colCount}</f:variable>
|
||||
<f:variable name="spaceInPx">{colCount - 1 * settings.colspacewidth / 100 * settings.coverimagewidth}</f:variable>
|
||||
<f:variable name="coverImageWidth">{settings.coverimagewidth - spaceInPx / colCount}</f:variable>
|
||||
<f:variable name="coverImageWidth_x2">{coverImageWidth * 2}</f:variable>
|
||||
|
||||
<f:if condition="{youtubevideos -> f:count()} > 1">
|
||||
<div id="youtubevideogallery-{data.uid}" class="youtubevideogallery colcount-{colCount}">
|
||||
</f:if>
|
||||
<f:for each="{youtubevideos}" as="item" iteration="iterator">
|
||||
<f:render partial="Item" arguments="{_all}" />
|
||||
<f:if condition="{iterator.isLast} != 1"><div class="space" style="width: {settings.colspacewidth}%; padding-bottom: {settings.colspacewidth}%;"></div></f:if>
|
||||
</f:for>
|
||||
<f:if condition="{youtubevideos -> f:count()} > 1">
|
||||
</div>
|
||||
</f:if>
|
||||
<f:if condition="{pagination.numberOfPages} > 1">
|
||||
<f:render partial="Pagination" arguments="{pagination:pagination}" />
|
||||
</f:if>
|
||||
<f:if condition="!{gdprnote}">
|
||||
<f:then><script>disableGdpr = 1;</script></f:then>
|
||||
<f:else><script>disableGdpr = 0;</script></f:else>
|
||||
</f:if>
|
||||
</f:section>
|
||||
<f:section name="FooterAssets">
|
||||
<script>
|
||||
function getCookie(t){var e=("; "+document.cookie).split("; "+t+"=");return 2==e.length?e.pop().split(";").shift():null}function gdprCancel(){var t=event.target||event.srcElement;dataYtUid=0,dataYtUid=t.getAttribute("data-yt-uid"),document.getElementById("gdpr-"+dataYtUid).style.display="none"}function gdprAgree(){document.cookie="youtubevideo-consent=1; path=/;";var t=event.target||event.srcElement;dataYtUid=0,dataYtUid=t.getAttribute("data-yt-uid"),document.getElementById("gdpr-"+dataYtUid).style.display="none",document.getElementById("coverimage-"+dataYtUid).click()}function gdprAgreeOnce(){var t=event.target||event.srcElement;dataYtUid=0,dataYtUid=t.getAttribute("data-yt-uid"),gdprAgreedOnce=dataYtUid,document.getElementById("gdpr-"+dataYtUid).style.display="none",document.getElementById("coverimage-"+dataYtUid).click()}function coverimageClick(t){t||(t=window.event);var e=t.target||t.srcElement;playerId=0,playerId=e.getAttribute("data-yt-id"),dataYtCode=0,dataYtCode=e.getAttribute("data-yt-code"),dataYtVars=0,dataYtVars=JSON.parse("{"+e.getAttribute("data-yt-vars").replace(/,\s*$/,"")+"}"),dataYtHost=0,dataYtHost=e.getAttribute("data-yt-host"),dataYtUid=0,dataYtUid=e.getAttribute("data-yt-uid"),getCookie("youtubevideo-consent")||gdprAgreedOnce==dataYtUid||disableGdpr?(youTubeApiIsLoaded?loadPlayer():loadYouTubeApi(),e.classList.add("play")):document.getElementById("gdpr-"+dataYtUid).style.display="block"}function loadYouTubeApi(){var t=document.createElement("script");t.src="https://www.youtube.com/iframe_api";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),youTubeApiIsLoaded=1}function loadPlayer(){player=new YT.Player(playerId,{height:"390",width:"640",videoId:dataYtCode,host:dataYtHost,playerVars:dataYtVars,events:{onReady:onPlayerReady,onStateChange:onPlayerStateChange}})}function onYouTubeIframeAPIReady(){loadPlayer()}function onPlayerReady(t){player.setPlaybackRate(1),player.playVideo()}function onPlayerStateChange(t){}function stopVideo(){player.stopVideo()}function youtubevideoDetectWidth(t){for(var e=document.getElementsByClassName(t),a=0;a<e.length;++a){var d=e[a],o=e[a].clientWidth;o<containerBreakpointSmall?d.classList.add("small"):d.classList.remove("small"),o<containerBreakpointTiny?d.classList.add("tiny"):d.classList.remove("tiny")}}youTubeApiIsLoaded=0,gdprAgreedOnce=0,youtubevideoDetectWidth("youtubevideo"),window.addEventListener("resize",function(){youtubevideoDetectWidth("youtubevideo")});
|
||||
</script>
|
||||
<f:comment>
|
||||
<script type="text/javascript" src="{f:uri.resource(path: 'JavaScript/youtubevideo.js', extensionName: 'Youtubevideo')}"></script>
|
||||
</f:comment>
|
||||
</f:section>
|
||||
</html>
|
||||
@@ -0,0 +1,35 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<f:section name="HeaderAssets">
|
||||
<link rel="preconnect" href="https://www.youtube-nocookie.com">
|
||||
<link rel="preconnect" href="https://www.youtube.com">
|
||||
<link rel="preconnect" href="https://i.ytimg.com">
|
||||
<link rel="preconnect" href="https://i9.ytimg.com">
|
||||
<link rel="preconnect" href="https://s.ytimg.com">
|
||||
</f:section>
|
||||
<f:layout name="Default" />
|
||||
<f:section name="Main">
|
||||
<f:if condition="{youtubevideos -> f:count()} < {data.tx_youtubevideo_colcount}">
|
||||
<f:then><f:variable name="colCount">{youtubevideos -> f:count()}</f:variable></f:then>
|
||||
<f:else><f:variable name="colCount">{data.tx_youtubevideo_colcount}</f:variable></f:else>
|
||||
</f:if>
|
||||
<f:variable name="spaceWidthTotal">{colCount - 1 * settings.colspacewidth}</f:variable>
|
||||
<f:variable name="itemWidth">{100 - spaceWidthTotal / colCount}</f:variable>
|
||||
<f:variable name="spaceInPx">{colCount - 1 * settings.colspacewidth / 100 * settings.coverimagewidth}</f:variable>
|
||||
<f:variable name="coverImageWidth">{settings.coverimagewidth - spaceInPx / colCount}</f:variable>
|
||||
<f:variable name="coverImageWidth_x2">{coverImageWidth * 2}</f:variable>
|
||||
|
||||
<f:if condition="{youtubevideos -> f:count()} > 1">
|
||||
<div id="youtubevideogallery-{data.uid}" class="youtubevideogallery colcount-{colCount}">
|
||||
</f:if>
|
||||
<f:for each="{youtubevideos}" as="item" iteration="iterator">
|
||||
<f:render partial="Iframe" arguments="{_all}" />
|
||||
<f:if condition="{iterator.isLast} != 1"><div class="space" style="width: {settings.colspacewidth}%; padding-bottom: {settings.colspacewidth}%;"></div></f:if>
|
||||
</f:for>
|
||||
<f:if condition="{youtubevideos -> f:count()} > 1">
|
||||
</div>
|
||||
</f:if>
|
||||
<f:if condition="{pagination.numberOfPages} > 1">
|
||||
<f:render partial="Pagination" arguments="{pagination:pagination}" />
|
||||
</f:if>
|
||||
</f:section>
|
||||
</html>
|
||||
BIN
typo3conf/ext/youtubevideo/Resources/Public/Icons/Extension.png
Normal file
BIN
typo3conf/ext/youtubevideo/Resources/Public/Icons/Extension.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="94px" height="94px" viewBox="0 0 94 94" enable-background="new 0 0 94 94" xml:space="preserve">
|
||||
<path fill="#FFFFFF" d="M5.875,5.875h82.25v82.25H5.875V5.875z"/>
|
||||
<path fill="#CC181E" d="M0,0v93.5h93.5V0H0z"/>
|
||||
<polyline fill="#FFFFFF" points="30.723,26.455 66.277,47.002 30.723,67.545 "/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 662 B |
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="94px" height="94px" viewBox="0 0 94 94" enable-background="new 0 0 94 94" xml:space="preserve">
|
||||
<path fill="#FFFFFF" d="M5.875,5.875h82.25v82.25H5.875V5.875z"/>
|
||||
<path fill="#999999" d="M5.875,5.875v82.25h82.25V5.875H5.875z M11.75,11.75h70.5v70.5h-70.5V11.75z"/>
|
||||
<polyline fill="#CC181E" points="30.723,26.455 66.277,47.002 30.723,67.545 "/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 716 B |
@@ -0,0 +1,130 @@
|
||||
// THIS FILE IS NO USED DIRECTLY
|
||||
// Minified and copied into Private/Resources/Templates/Youtubevideo.html
|
||||
|
||||
youTubeApiIsLoaded = 0;
|
||||
gdprAgreedOnce = 0;
|
||||
|
||||
// Read cookies
|
||||
function getCookie(name) {
|
||||
var value = "; " + document.cookie;
|
||||
var parts = value.split("; " + name + "=");
|
||||
if (parts.length == 2) return parts.pop().split(";").shift();
|
||||
else return null;
|
||||
}
|
||||
|
||||
// Cancel without playing the video
|
||||
function gdprCancel() {
|
||||
var el = (event.target || event.srcElement);
|
||||
dataYtUid = 0;
|
||||
dataYtUid = el.getAttribute('data-yt-uid');
|
||||
document.getElementById('gdpr-' + dataYtUid).style.display='none';
|
||||
}
|
||||
// Agree and remember by setting cookie
|
||||
function gdprAgree() {
|
||||
document.cookie = "youtubevideo-consent=1; path=/;";
|
||||
var el = (event.target || event.srcElement);
|
||||
dataYtUid = 0;
|
||||
dataYtUid = el.getAttribute('data-yt-uid');
|
||||
document.getElementById('gdpr-' + dataYtUid).style.display='none';
|
||||
document.getElementById('coverimage-' + dataYtUid).click();
|
||||
}
|
||||
|
||||
// Agree once but ask again next time
|
||||
function gdprAgreeOnce() {
|
||||
var el = (event.target || event.srcElement);
|
||||
dataYtUid = 0;
|
||||
dataYtUid = el.getAttribute('data-yt-uid');
|
||||
gdprAgreedOnce = dataYtUid;
|
||||
document.getElementById('gdpr-' + dataYtUid).style.display='none';
|
||||
document.getElementById('coverimage-' + dataYtUid).click();
|
||||
}
|
||||
// What happens on clicking the cover image
|
||||
function coverimageClick(event) {
|
||||
if (!event) {
|
||||
event = window.event;
|
||||
};
|
||||
var el = (event.target || event.srcElement);
|
||||
playerId = 0;
|
||||
playerId = el.getAttribute('data-yt-id');
|
||||
dataYtCode = 0;
|
||||
dataYtCode = el.getAttribute('data-yt-code');
|
||||
dataYtVars = 0;
|
||||
dataYtVars = JSON.parse('{' + el.getAttribute('data-yt-vars').replace(/,\s*$/, "") + '}');
|
||||
dataYtHost = 0;
|
||||
dataYtHost = el.getAttribute('data-yt-host');
|
||||
dataYtUid = 0;
|
||||
dataYtUid = el.getAttribute('data-yt-uid');
|
||||
if (getCookie('youtubevideo-consent') || (gdprAgreedOnce == dataYtUid) || disableGdpr) {
|
||||
if (youTubeApiIsLoaded) {
|
||||
loadPlayer();
|
||||
} else {
|
||||
loadYouTubeApi();
|
||||
}
|
||||
el.classList.add('play');
|
||||
} else {
|
||||
document.getElementById('gdpr-' + dataYtUid).style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
// Load YouTube API
|
||||
function loadYouTubeApi() {
|
||||
var tag = document.createElement('script');
|
||||
tag.src = "https://www.youtube.com/iframe_api";
|
||||
var firstScriptTag = document.getElementsByTagName('script')[0];
|
||||
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
|
||||
youTubeApiIsLoaded = 1;
|
||||
}
|
||||
|
||||
// Load YouTube player with video settings
|
||||
function loadPlayer() {
|
||||
player = new YT.Player(playerId, {
|
||||
height: '390',
|
||||
width: '640',
|
||||
videoId: dataYtCode,
|
||||
host: dataYtHost,
|
||||
playerVars: dataYtVars,
|
||||
events: {
|
||||
'onReady': onPlayerReady,
|
||||
'onStateChange': onPlayerStateChange
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function onYouTubeIframeAPIReady() {
|
||||
loadPlayer();
|
||||
}
|
||||
|
||||
function onPlayerReady(event) {
|
||||
player.setPlaybackRate(1);
|
||||
player.playVideo();
|
||||
}
|
||||
|
||||
function onPlayerStateChange(event) {}
|
||||
|
||||
function stopVideo() {
|
||||
player.stopVideo();
|
||||
}
|
||||
|
||||
// Set video window breakpoint classes for 'small' and 'tiny'
|
||||
function youtubevideoDetectWidth(a) {
|
||||
var container = document.getElementsByClassName(a);
|
||||
for (var i = 0; i < container.length; ++i) {
|
||||
var item = container[i];
|
||||
var width = container[i].clientWidth;
|
||||
if (width < containerBreakpointSmall) {
|
||||
item.classList.add('small');
|
||||
} else {
|
||||
item.classList.remove('small');
|
||||
}
|
||||
if (width < containerBreakpointTiny) {
|
||||
item.classList.add('tiny');
|
||||
} else {
|
||||
item.classList.remove('tiny');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
youtubevideoDetectWidth('youtubevideo');
|
||||
window.addEventListener("resize", function() {
|
||||
youtubevideoDetectWidth('youtubevideo');
|
||||
});
|
||||
@@ -0,0 +1,45 @@
|
||||
.youtubevideo-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
grid-gap: 8px;
|
||||
}
|
||||
|
||||
.youtubevideo-item {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.youtubevideo-item b.title {
|
||||
display: inline-block;
|
||||
padding-top: 0.5em;
|
||||
line-height: 1.2em;
|
||||
}
|
||||
|
||||
.youtubevideo-wrapper {
|
||||
position: relative;
|
||||
padding-bottom: 56.25%;
|
||||
}
|
||||
|
||||
.youtubevideo-wrapper iframe {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.youtubevideo-item ul {
|
||||
padding: 0.3em 0 0 1.5em;
|
||||
margin: 0;
|
||||
line-height: 1.3em;
|
||||
color: #666
|
||||
}
|
||||
|
||||
.youtubevideo-item ul li {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.settings {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
.youtubevideo {
|
||||
position: relative;
|
||||
font-size: 21px;
|
||||
}
|
||||
|
||||
.youtubevideo>.videoWrapper {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.youtubevideo>.videoWrapper>.coverimage {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1
|
||||
}
|
||||
|
||||
.youtubevideo>.videoWrapper>.coverimage.play {
|
||||
display: none
|
||||
}
|
||||
|
||||
.youtubevideo>.videoWrapper>iframe {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0
|
||||
}
|
||||
|
||||
.youtubevideo-gdpr-overlay {
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
background: rgba(255, 255, 255, 0.93);
|
||||
color: #000;
|
||||
font-size: 1rem;
|
||||
line-height: 1.3em;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
padding: 2rem;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.youtubevideo-gdpr-text {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translateY(-50%) translateX(-50%);
|
||||
padding: 1em;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.youtubevideo-gdpr-note {
|
||||
max-width: 80%;
|
||||
margin: auto;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.youtubevideo-gdpr-button {
|
||||
text-transform: uppercase;
|
||||
border: 1px solid black;
|
||||
line-height: 1em;
|
||||
padding: 0.5em 1em;
|
||||
display: inline-block;
|
||||
font-size: 0.75em;
|
||||
margin-right: 0.3em;
|
||||
margin-bottom: 0.3em;
|
||||
color: #000;
|
||||
transition: all .3s;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.youtubevideo-gdpr-button:hover {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.youtubevideo-gdpr-cancel {
|
||||
padding: 0.5em;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
font-size: 2em;
|
||||
font-weight: normal;
|
||||
color: #000;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.youtubevideo-gdpr-cancel:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.small .youtubevideo-gdpr-overlay {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.tiny .youtubevideo-gdpr-overlay {
|
||||
font-size: 0.65em;
|
||||
}
|
||||
|
||||
.youtubevideo>.videoWrapper>.coverimage>.covertext {
|
||||
position: absolute;
|
||||
text-align: left;
|
||||
box-sizing: border-box;
|
||||
font-size: 0.8em;
|
||||
line-height: 1.5em;
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
padding: 0.8rem 1.2rem;
|
||||
margin-left: 1.5rem;
|
||||
margin-right: 1.5rem;
|
||||
bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.youtubevideo.small>.videoWrapper>.coverimage>.covertext {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 0.5rem 0.9rem;
|
||||
}
|
||||
|
||||
.youtubevideo.tiny>.videoWrapper>.coverimage>.covertext {
|
||||
padding: 0.3rem 0.5rem;
|
||||
}
|
||||
|
||||
.youtubevideo>.videoWrapper>.coverimage>.covertext h2 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.youtubevideo>.videoWrapper>.coverimage>.covertext h2,
|
||||
.youtubevideo>.videoWrapper>.coverimage>.covertext p {
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.youtubevideo.small>.videoWrapper>.coverimage>.covertext h2 {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.youtubevideo.tiny>.videoWrapper>.coverimage>.covertext h2 {
|
||||
font-size: 0.9em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.youtubevideo.small>.videoWrapper>.coverimage>.covertext p {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.youtubevideo>.videoWrapper>.coverimage-click {
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: transparent;
|
||||
z-index: 10;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.youtubevideo>.videoWrapper>.coverimage-click:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.youtubevideo>.videoWrapper>.coverimage-click.play {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.youtubevideo>.videoWrapper>.coverimage-click.play+.coverimage {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* play button colors */
|
||||
.youtubevideo .playbutton {
|
||||
position: absolute;
|
||||
width: 15%;
|
||||
height: auto;
|
||||
min-width: 40px;
|
||||
max-width: 80px;
|
||||
top: 50%;
|
||||
right: 50%;
|
||||
transform: translateY(-50%) translateX(50%);
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.youtubevideo:hover .playbutton .ytp-large-play-button-bg {
|
||||
fill: #f00;
|
||||
transition: all .3s;
|
||||
}
|
||||
|
||||
/* if .youtubevideo width is under set px, breakpoint is set */
|
||||
.youtubevideogallery>.item, .youtubevideogallery>.space {
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* column layouts */
|
||||
.youtubevideogallery.colcount-0 .space,
|
||||
.youtubevideogallery.colcount-3 .space:nth-child(3n),
|
||||
.youtubevideogallery.colcount-2 .space:nth-child(4n),
|
||||
.youtubevideogallery.colcount-4 .space:nth-child(8n),
|
||||
.youtubevideogallery.colcount-5 .space:nth-child(10n),
|
||||
.youtubevideogallery.colcount-6 .space:nth-child(12n),
|
||||
.youtubevideogallery.colcount-7 .space:nth-child(14n),
|
||||
.youtubevideogallery.colcount-8 .space:nth-child(16n) {
|
||||
float: none;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.youtubevideo-gdpr-overlay {
|
||||
background: rgba(0, 0, 0, 0.93);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.youtubevideo-gdpr-button {
|
||||
color: #fff;
|
||||
background: #000;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.youtubevideo-gdpr-button:hover {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.youtubevideo-gdpr-cancel {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
29
typo3conf/ext/youtubevideo/composer.json
Normal file
29
typo3conf/ext/youtubevideo/composer.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "t3brightside/youtubevideo",
|
||||
"description": "TYPO3 CMS extension for YouTube video content with custom cover images, gallery layout and backend previews.",
|
||||
"type": "typo3-cms-extension",
|
||||
"keywords": ["TYPO3", "YouTube", "video", "responsive"],
|
||||
"homepage": "https://github.com/t3brightside/youtubevideo/",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Tanel Põld",
|
||||
"role": "Developer",
|
||||
"homepage": "https://t3brightside.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"typo3/cms-core": "^10.4 ||^11.5",
|
||||
"typo3/cms-fluid-styled-content": "^10.4 || ^11.5"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Brightside\\Youtubevideo\\": "Classes"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"typo3/cms": {
|
||||
"extension-key": "youtubevideo"
|
||||
}
|
||||
}
|
||||
}
|
||||
4
typo3conf/ext/youtubevideo/ext_conf_template.txt
Normal file
4
typo3conf/ext/youtubevideo/ext_conf_template.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
# cat=basic/enable; type=options[Disabled=0,Enabled=1]; label=Enable Back End Previews
|
||||
youtubevideoEnableBePlayer = 1
|
||||
# cat=basic/enable; type=options[Disabled=0,Enabled=1]; label=Enable Pagination (t3brightside/paginatedprocessors needed)
|
||||
youtubevideoEnablePagination = 0
|
||||
39
typo3conf/ext/youtubevideo/ext_emconf.php
Normal file
39
typo3conf/ext/youtubevideo/ext_emconf.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/***************************************************************
|
||||
* Extension Manager/Repository config file for ext "youtubevideo".
|
||||
*
|
||||
* Auto generated 15-07-2022 12:27
|
||||
*
|
||||
* Manual updates:
|
||||
* Only the data in the array - everything else is removed by next
|
||||
* writing. "version" and "dependencies" must not be touched!
|
||||
***************************************************************/
|
||||
|
||||
$EM_CONF[$_EXTKEY] = array (
|
||||
'title' => 'YouTube Video',
|
||||
'description' => 'YouTube video content with custom cover images, gallery layout and backend previews.',
|
||||
'category' => 'fe',
|
||||
'version' => '2.1.1',
|
||||
'state' => 'stable',
|
||||
'clearcacheonload' => true,
|
||||
'author' => 'Tanel Põld',
|
||||
'author_email' => 'tanel@brightside.ee',
|
||||
'author_company' => 'Brightside OÜ / t3brightside.com',
|
||||
'constraints' =>
|
||||
array (
|
||||
'depends' =>
|
||||
array (
|
||||
'typo3' => '10.4.0-11.5.99',
|
||||
'fluid_styled_content' => '',
|
||||
),
|
||||
'conflicts' =>
|
||||
array (
|
||||
),
|
||||
'suggests' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uploadfolder' => false,
|
||||
);
|
||||
|
||||
16
typo3conf/ext/youtubevideo/ext_localconf.php
Normal file
16
typo3conf/ext/youtubevideo/ext_localconf.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') || die ('Access denied.');
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:youtubevideo/Configuration/PageTS/setup.typoscript">');
|
||||
|
||||
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
|
||||
$iconRegistry->registerIcon(
|
||||
'youtubevideo_icon',
|
||||
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
|
||||
['source' => 'EXT:youtubevideo/Resources/Public/Icons/ext_icon_content.svg']
|
||||
);
|
||||
|
||||
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['youtubevideo_pi1']
|
||||
= \Brightside\Youtubevideo\Hooks\PageLayoutView\YoutubevideoContentElementPreviewRenderer::class;
|
||||
|
||||
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals']['Brightside\\Youtubevideo\\Evaluation\\HoursMinutesSeconds'] = '';
|
||||
6
typo3conf/ext/youtubevideo/ext_tables.php
Normal file
6
typo3conf/ext/youtubevideo/ext_tables.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') || die('Access denied.');
|
||||
|
||||
$GLOBALS['TBE_STYLES']['skins']['youtubevideo']['stylesheetDirectories'][] =
|
||||
'EXT:youtubevideo/Resources/Public/Styles/Backend/';
|
||||
23
typo3conf/ext/youtubevideo/ext_tables.sql
Normal file
23
typo3conf/ext/youtubevideo/ext_tables.sql
Normal file
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# Adds YouTube Video fields to the tt_content table
|
||||
#
|
||||
CREATE TABLE tt_content (
|
||||
tx_youtubevideo_assets int(1) DEFAULT '0' NOT NULL,
|
||||
tx_youtubevideo_colcount int(1) DEFAULT '0' NOT NULL,
|
||||
tx_youtubevideo_oneatatime int(1) DEFAULT '0' NOT NULL,
|
||||
tx_youtubevideo_titles int(1) DEFAULT '0' NOT NULL,
|
||||
tx_youtubevideo_descriptions int(1) DEFAULT '0' NOT NULL,
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE sys_file_reference (
|
||||
tx_youtubevideo_autoplay tinyint(1) unsigned DEFAULT '0' NOT NULL,
|
||||
tx_youtubevideo_rel tinyint(1) unsigned DEFAULT '0' NOT NULL,
|
||||
tx_youtubevideo_starttime varchar(10),
|
||||
tx_youtubevideo_endtime varchar(10),
|
||||
tx_youtubevideo_ratio tinyint(1) unsigned DEFAULT '0' NOT NULL,
|
||||
tx_youtubevideo_fullscreen tinyint(1) unsigned DEFAULT '0' NOT NULL,
|
||||
tx_youtubevideo_loop tinyint(1) unsigned DEFAULT '0' NOT NULL,
|
||||
tx_youtubevideo_mute tinyint(1) unsigned DEFAULT '0' NOT NULL,
|
||||
tx_youtubevideo_coverimage int(1) DEFAULT '0' NOT NULL,
|
||||
);
|
||||
Reference in New Issue
Block a user