diff --git a/typo3/sysext/cms/ext_localconf.php b/typo3/sysext/cms/ext_localconf.php index fb88918bba49333b433ded092f0a20d8fdeff051..4bb58479c4f65a59f01babbe100291aa858ed8c6 100644 --- a/typo3/sysext/cms/ext_localconf.php +++ b/typo3/sysext/cms/ext_localconf.php @@ -78,22 +78,6 @@ mod.wizards.newContentElement { CType = uploads } } - multimedia { - icon = gfx/c_wiz/multimedia.gif - title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_multimedia_title - description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_multimedia_description - tt_content_defValues { - CType = multimedia - } - } - media { - icon = gfx/c_wiz/multimedia.gif - title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_media_title - description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_media_description - tt_content_defValues { - CType = media - } - } menu { icon = gfx/c_wiz/sitemap2.gif title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_title @@ -129,7 +113,7 @@ mod.wizards.newContentElement { } } - special.show = uploads,media,menu,html,div,shortcut + special.show = uploads,menu,html,div,shortcut # dummy placeholder for forms group forms.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:forms diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-64719-MediaContentMovedToSystemExtension.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-64719-MediaContentMovedToSystemExtension.rst new file mode 100644 index 0000000000000000000000000000000000000000..c129b79e749aaa7ae7ac4d272cb172a3eebdf502 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-64719-MediaContentMovedToSystemExtension.rst @@ -0,0 +1,39 @@ +==================================================================================================== +Breaking: #64719 - Multimedia and Media cObjects and Content Types are moved to new system extension +==================================================================================================== + +Description +=========== + +The Content Element Types "media" and "multimedia" has been extracted into one single place, which is an +extension called "mediace". This extension is not installed by default but is shipped with the core. + +The following Content Objects are not available anymore by default: + + * MULTIMEDIA + * MEDIA + * SWFOBJECT + * FLOWPLAYER + * QTOBJECT + +The Content Types "media" and "multimedia" are not available anymore by default. + +The table column ``tt_content.multimedia`` is not available anymore by default. + +Impact +====== + +Any TypoScript using any of the cObjects directly or Content Elements with the CType "media" or "multimedia" +will result in no output. Existing Content Elements of this type can not be edited anymore. + + +Affected installations +====================== + +TYPO3 CMS 7 installations still using any of the cObjects or having Content Elements of CType "media" or "multimedia". + + +Migration +========= + +Install the system extension "mediace" to regain all functionality as it was before. diff --git a/typo3/sysext/css_styled_content/ext_localconf.php b/typo3/sysext/css_styled_content/ext_localconf.php index 7b0381550b7376ca2deeed3efab13873cab84d14..f5bb9e3f6b78cddccaf0269193975c19c448b6cc 100644 --- a/typo3/sysext/css_styled_content/ext_localconf.php +++ b/typo3/sysext/css_styled_content/ext_localconf.php @@ -4,7 +4,10 @@ defined('TYPO3_MODE') or die(); // unserializing the configuration so we can use it here: $_EXTCONF = unserialize($_EXTCONF); if (!$_EXTCONF || $_EXTCONF['setPageTSconfig']) { - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:css_styled_content/pageTSconfig.txt">'); + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' + # Removes obsolete type values and fields from "Content Element" table "tt_content" + TCEFORM.tt_content.image_frames.disabled = 1 + '); } if (!$_EXTCONF || $_EXTCONF['removePositionTypes']) { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' diff --git a/typo3/sysext/css_styled_content/pageTSconfig.txt b/typo3/sysext/css_styled_content/pageTSconfig.txt deleted file mode 100644 index db898a4e020aa256de48ba6bd93597913095d2ef..0000000000000000000000000000000000000000 --- a/typo3/sysext/css_styled_content/pageTSconfig.txt +++ /dev/null @@ -1,11 +0,0 @@ -# *************************************************************************************** -# Page TSconfig for "css_styled_content" -# -# Removes obsolete type values and fields from "Content Element" table "tt_content" -# *************************************************************************************** - -TCEFORM.tt_content { - image_frames.disabled = 1 - - CType.removeItems = swfobject,qtobject,multimedia -} diff --git a/typo3/sysext/css_styled_content/static/constants.txt b/typo3/sysext/css_styled_content/static/constants.txt index 86a02b9278732000c04cc559380332b400957870..3515cd165339c80723097855235a5e1fd7f77ac3 100644 --- a/typo3/sysext/css_styled_content/static/constants.txt +++ b/typo3/sysext/css_styled_content/static/constants.txt @@ -107,23 +107,6 @@ styles.content.loginform { templateFile = EXT:felogin/template.html } -styles.content.media { - # cat=content/cMedia/j1; type=; label= Video Player: configure the path to the video player - videoPlayer = typo3/contrib/flashmedia/flvplayer.swf - # cat=content/cMedia/j2; type=int+; label= Media Video Width: define the default width for the media video - defaultVideoWidth = 600 - # cat=content/cMedia/j3; type=int+; label= Media Video Height: define the default height for the media video - defaultVideoHeight = 400 - # cat=content/cMedia/j4; type=; label= Audio Player: configure the path to the video player - audioPlayer = typo3/contrib/flashmedia/player.swf - # cat=content/cMedia/j5; type=int+; label= Media Audio Width: define the default width for the media audio - defaultAudioWidth = 300 - # cat=content/cMedia/j6; type=int+; label= Media Audio Height: define the default height for the media audio - defaultAudioHeight = 30 - # cat=content/cMedia/j7; type=; label= Flow Player: configure the path to the flow-player - flowPlayer = typo3/contrib/flowplayer/flowplayer-3.2.16.swf -} - styles.content.table { # cat=content/cTable/k2; type=color; label= Table background color, Color 1: Background color for table when "Backgr. Color" has been set to "Color 1" backgroundColor.1 = #EDEBF1 diff --git a/typo3/sysext/css_styled_content/static/setup.txt b/typo3/sysext/css_styled_content/static/setup.txt index 3ba0d83f533c39d3eb7992fe1c821e8bce0e98dc..3d11d4d407155588d50d63ac68715471ee546f0e 100644 --- a/typo3/sysext/css_styled_content/static/setup.txt +++ b/typo3/sysext/css_styled_content/static/setup.txt @@ -1407,199 +1407,6 @@ tt_content.table { } } -# ****************** -# CType: multimedia -# ****************** -tt_content.multimedia = COA -tt_content.multimedia { - 10 = < lib.stdheader - - 20 = MULTIMEDIA - 20.file.field = multimedia - 20.file.wrap = uploads/media/ - 20.file.listNum = 0 - 20.params.field = bodytext - - 20.stdWrap { - editIcons = tt_content: multimedia, bodytext - editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia - - prefixComment = 2 | Multimedia element: - } -} - -# ***************** -# CType: swfobject -# ***************** -tt_content.swfobject = COA -tt_content.swfobject { - 10 = < lib.stdheader - - 20 = SWFOBJECT - 20 { - file = - width = - height = - - flexParams.field = pi_flexform - - alternativeContent.field = bodytext - - layout = ###SWFOBJECT### - - video { - player = {$styles.content.media.videoPlayer} - - defaultWidth = {$styles.content.media.defaultVideoWidth} - defaultHeight = {$styles.content.media.defaultVideoHeight} - - default { - params.quality = high - params.menu = false - params.allowScriptAccess = sameDomain - params.allowFullScreen = true - } - mapping { - - } - } - - audio { - player = {$styles.content.media.audioPlayer} - - defaultWidth = {$styles.content.media.defaultAudioWidth} - defaultHeight = {$styles.content.media.defaultAudioHeight} - - default { - params.quality = high - params.allowScriptAccess = sameDomain - params.menu = false - } - mapping { - flashvars.file = soundFile - } - } - - } - 20.stdWrap { - editIcons = tt_content: multimedia, imagewidth, imageheight, pi_flexform, bodytext - editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia - - prefixComment = 2 | SWFobject element: - } -} - -# ***************** -# CType: qtobject -# ***************** -tt_content.qtobject = COA -tt_content.qtobject { - 10 = < lib.stdheader - - 20 = QTOBJECT - 20 { - file = - width = - height = - - flexParams.field = pi_flexform - - alternativeContent.field = bodytext - - layout = ###QTOBJECT### - - video { - player = {$styles.content.media.videoPlayer} - - defaultWidth = {$styles.content.media.defaultVideoWidth} - defaultHeight = {$styles.content.media.defaultVideoHeight} - - default { - params.quality = high - params.menu = false - params.allowScriptAccess = sameDomain - params.allowFullScreen = true - } - mapping { - - } - } - - audio { - player = {$styles.content.media.audioPlayer} - - defaultWidth = {$styles.content.media.defaultAudioWidth} - defaultHeight = {$styles.content.media.defaultAudioHeight} - - default { - params.quality = high - params.allowScriptAccess = sameDomain - params.menu = false - } - mapping { - flashvars.file = soundFile - } - } - } - 20.stdWrap { - editIcons = tt_content: multimedia, imagewidth, imageheight, pi_flexform, bodytext - editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia - - prefixComment = 2 | QTobject element: - } -} - -# ***************** -# CType: media -# ***************** -tt_content.media = COA -tt_content.media { - 10 = < lib.stdheader - - 20 = MEDIA - 20 { - - flexParams.field = pi_flexform - alternativeContent < tt_content.text.20 - alternativeContent.field = bodytext - - type = video - renderType = auto - allowEmptyUrl = 0 - forcePlayer = 1 - - fileExtHandler { - default = MEDIA - avi = MEDIA - asf = MEDIA - class = MEDIA - wmv = MEDIA - mp3 = SWF - mp4 = SWF - m4v = SWF - swa = SWF - flv = SWF - swf = SWF - mov = QT - m4v = QT - m4a = QT - } - - mimeConf.swfobject < tt_content.swfobject.20 - mimeConf.qtobject < tt_content.qtobject.20 - mimeConf.flowplayer < tt_content.swfobject.20 - mimeConf.flowplayer.audio.player = {$styles.content.media.flowPlayer} - mimeConf.flowplayer.video.player = {$styles.content.media.flowPlayer} - - } - 20.stdWrap { - editIcons = tt_content: pi_flexform, bodytext - editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia - - prefixComment = 2 | Media element: - } -} - # **************** # CType: menu # **************** diff --git a/typo3/sysext/frontend/Configuration/TCA/tt_content.php b/typo3/sysext/frontend/Configuration/TCA/tt_content.php index 2d99a91663c3f4661d77df409d6d162a3fcf6f67..5db300283b2f909955f14bcec73f2ddecbc43ce1 100644 --- a/typo3/sysext/frontend/Configuration/TCA/tt_content.php +++ b/typo3/sysext/frontend/Configuration/TCA/tt_content.php @@ -35,8 +35,6 @@ return array( 'bullets' => 'mimetypes-x-content-list-bullets', 'table' => 'mimetypes-x-content-table', 'uploads' => 'mimetypes-x-content-list-files', - 'multimedia' => 'mimetypes-x-content-multimedia', - 'media' => 'mimetypes-x-content-multimedia', 'menu' => 'mimetypes-x-content-menu', 'list' => 'mimetypes-x-content-plugin', 'login' => 'mimetypes-x-content-login', @@ -54,8 +52,6 @@ return array( 'bullets' => 'tt_content_bullets.gif', 'table' => 'tt_content_table.gif', 'uploads' => 'tt_content_uploads.gif', - 'multimedia' => 'tt_content_mm.gif', - 'media' => 'tt_content_mm.gif', 'menu' => 'tt_content_menu.gif', 'list' => 'tt_content_list.gif', 'login' => 'tt_content_login.gif', @@ -70,7 +66,7 @@ return array( ), 'interface' => array( 'always_description' => 0, - 'showRecordFieldList' => 'CType,header,header_link,bodytext,image,imagewidth,imageorient,media,records,colPos,starttime,endtime,fe_group' + 'showRecordFieldList' => 'CType,header,header_link,bodytext,image,media,imagewidth,imageorient,records,colPos,starttime,endtime,fe_group' ), 'columns' => array( 'CType' => array( @@ -125,16 +121,6 @@ return array( 'LLL:EXT:cms/locallang_ttc.xlf:CType.div.special', '--div--' ), - array( - 'LLL:EXT:cms/locallang_ttc.xlf:CType.I.7', - 'multimedia', - 'i/tt_content_mm.gif' - ), - array( - 'LLL:EXT:cms/locallang_ttc.xlf:CType.I.18', - 'media', - 'i/tt_content_mm.gif' - ), array( 'LLL:EXT:cms/locallang_ttc.xlf:CType.I.12', 'menu', @@ -1262,14 +1248,6 @@ return array( 'default' => 0 ) ), - 'media' => array( - 'label' => 'LLL:EXT:cms/locallang_ttc.xlf:media', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('media', array( - 'appearance' => array( - 'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:media.addFileReference' - ) - )) - ), 'file_collections' => array( 'label' => 'LLL:EXT:cms/locallang_ttc.xlf:file_collections', 'config' => array( @@ -1283,18 +1261,13 @@ return array( 'size' => 5, ) ), - 'multimedia' => array( - 'label' => 'LLL:EXT:cms/locallang_ttc.xlf:multimedia', - 'config' => array( - 'type' => 'group', - 'internal_type' => 'file', - 'allowed' => 'txt,html,htm,class,swf,swa,dcr,wav,avi,au,mov,asf,mpg,wmv,mp3,mp4,m4v', - 'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'], - 'uploadfolder' => 'uploads/media', - 'size' => '2', - 'maxitems' => '1', - 'minitems' => '0' - ) + 'media' => array( + 'label' => 'LLL:EXT:cms/locallang_ttc.xlf:media', + 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('media', array( + 'appearance' => array( + 'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:media.addFileReference' + ) + )) ), 'filelink_size' => array( 'label' => 'LLL:EXT:cms/locallang_ttc.xlf:filelink_size', @@ -1492,8 +1465,7 @@ return array( </el> </ROOT> </T3DataStructure> - ', - ',media' => file_get_contents(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('cms') . 'flexform_media.xml') + ' ), 'search' => array( 'andWhere' => 'CType=\'list\'' @@ -1670,32 +1642,6 @@ return array( --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended' ), - 'multimedia' => array( - 'showitem' => '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general, - --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header, - --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.media, - --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.multimediafiles;multimediafiles, - --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance, - --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames, - --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, - --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.visibility;visibility, - --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access, - --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended' - ), - 'media' => array( - 'showitem' => '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general, - --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header, - --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.media, - pi_flexform; ;, - --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance, - --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames, - --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, - --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.visibility;visibility, - --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access, - --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.behaviour, - bodytext;LLL:EXT:cms/locallang_ttc.xlf:bodytext.ALT.media_formlabel;;richtext:rte_transform[flag=rte_enabled|mode=ts_css], - --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended' - ), 'menu' => array( 'showitem' => '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header, @@ -1836,10 +1782,6 @@ return array( 'showitem' => 'header;LLL:EXT:cms/locallang_ttc.xlf:header_formlabel, --linebreak--, header_layout;LLL:EXT:cms/locallang_ttc.xlf:header_layout_formlabel, header_position;LLL:EXT:cms/locallang_ttc.xlf:header_position_formlabel, date;LLL:EXT:cms/locallang_ttc.xlf:date_formlabel, --linebreak--, header_link;LLL:EXT:cms/locallang_ttc.xlf:header_link_formlabel, --linebreak--, subheader;LLL:EXT:cms/locallang_ttc.xlf:subheader_formlabel', 'canNotCollapse' => 1 ), - 'multimediafiles' => array( - 'showitem' => 'multimedia;LLL:EXT:cms/locallang_ttc.xlf:multimedia_formlabel, bodytext;LLL:EXT:cms/locallang_ttc.xlf:bodytext.ALT.multimedia_formlabel;;nowrap', - 'canNotCollapse' => 1 - ), 'imagelinks' => array( 'showitem' => 'image_zoom;LLL:EXT:cms/locallang_ttc.xlf:image_zoom_formlabel', 'canNotCollapse' => 1 diff --git a/typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php b/typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php index 2edade85c9dc96ab08c0da7284683696261cc705..48a36509a40112d2a313e6d4cbc8e6a0202d5173 100644 --- a/typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php +++ b/typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php @@ -74,11 +74,6 @@ class ContentObjectRendererTest extends \TYPO3\CMS\Core\Tests\UnitTestCase { 'RESTORE_REGISTER' => \TYPO3\CMS\Frontend\ContentObject\RestoreRegisterContentObject::class, 'TEMPLATE' => \TYPO3\CMS\Frontend\ContentObject\TemplateContentObject::class, 'FLUIDTEMPLATE' => \TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::class, - 'MULTIMEDIA' => \TYPO3\CMS\Frontend\ContentObject\MultimediaContentObject::class, - 'MEDIA' => \TYPO3\CMS\Frontend\ContentObject\MediaContentObject::class, - 'SWFOBJECT' => \TYPO3\CMS\Frontend\ContentObject\ShockwaveFlashObjectContentObject::class, - 'FLOWPLAYER' => \TYPO3\CMS\Frontend\ContentObject\FlowPlayerContentObject::class, - 'QTOBJECT' => \TYPO3\CMS\Frontend\ContentObject\QuicktimeObjectContentObject::class, 'SVG' => \TYPO3\CMS\Frontend\ContentObject\ScalableVectorGraphicsContentObject::class, 'EDITPANEL' => \TYPO3\CMS\Frontend\ContentObject\EditPanelContentObject::class ); diff --git a/typo3/sysext/frontend/ext_tables.sql b/typo3/sysext/frontend/ext_tables.sql index 167058281b23977f8b5b94c8bdf6fd6b56159c18..4613d3ba57d4a48af065f1a31e29b16b0e8f159d 100644 --- a/typo3/sysext/frontend/ext_tables.sql +++ b/typo3/sysext/frontend/ext_tables.sql @@ -301,7 +301,6 @@ CREATE TABLE tt_content ( target varchar(30) DEFAULT '' NOT NULL, section_frame int(11) unsigned DEFAULT '0' NOT NULL, date int(10) unsigned DEFAULT '0' NOT NULL, - multimedia tinytext, image_frames int(11) unsigned DEFAULT '0' NOT NULL, recursive tinyint(3) unsigned DEFAULT '0' NOT NULL, imageheight mediumint(8) unsigned DEFAULT '0' NOT NULL, diff --git a/typo3/sysext/frontend/Classes/ContentObject/FlowPlayerContentObject.php b/typo3/sysext/mediace/Classes/ContentObject/FlowPlayerContentObject.php similarity index 95% rename from typo3/sysext/frontend/Classes/ContentObject/FlowPlayerContentObject.php rename to typo3/sysext/mediace/Classes/ContentObject/FlowPlayerContentObject.php index e8c1f54ae05f8bb9efb3cf65fdd34a166800bedb..9edc9b9ca94d0fad72634f053f4b40eda9351af3 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/FlowPlayerContentObject.php +++ b/typo3/sysext/mediace/Classes/ContentObject/FlowPlayerContentObject.php @@ -1,5 +1,5 @@ <?php -namespace TYPO3\CMS\Frontend\ContentObject; +namespace TYPO3\CMS\Mediace\ContentObject; /* * This file is part of the TYPO3 CMS project. @@ -21,7 +21,7 @@ use TYPO3\CMS\Core\Utility\ArrayUtility; * * @author Stanislas Rolland */ -class FlowPlayerContentObject extends AbstractContentObject { +class FlowPlayerContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractContentObject { /** * File extension to mime type @@ -209,7 +209,7 @@ class FlowPlayerContentObject extends AbstractContentObject { public function render($conf = array()) { /** @var $pageRenderer \TYPO3\CMS\Core\Page\PageRenderer */ $pageRenderer = $GLOBALS['TSFE']->getPageRenderer(); - $prefix = ''; + $params = ($prefix = ''); if ($GLOBALS['TSFE']->baseUrl) { $prefix = $GLOBALS['TSFE']->baseUrl; } @@ -224,26 +224,26 @@ class FlowPlayerContentObject extends AbstractContentObject { $type = isset($conf['type.']) ? $this->cObj->stdWrap($conf['type'], $conf['type.']) : $conf['type']; $typeConf = $conf[$type . '.']; // Add Flowplayer js-file - $pageRenderer->addJsFile(TYPO3_mainDir . 'contrib/flowplayer/flowplayer-3.2.12.min.js'); + $pageRenderer->addJsFile($this->getPathToLibrary('flowplayer/flowplayer-3.2.12.min.js')); // Add Flowpayer css for exprss install - $pageRenderer->addCssFile(TYPO3_mainDir . 'contrib/flowplayer/express-install/express-install.css'); + $pageRenderer->addCssFile($this->getPathToLibrary('flowplayer/express-install/express-install.css')); // Add videoJS js-file - $pageRenderer->addJsFile(TYPO3_mainDir . 'contrib/videojs/video-js/video.js'); - // Add videoJS js-file - $pageRenderer->addJsFile(TYPO3_mainDir . 'contrib/videojs/video-js/video.js'); + $pageRenderer->addJsFile($this->getPathToLibrary('videojs/video-js/video.js')); // Add videoJS css-file - $pageRenderer->addCssFile(TYPO3_mainDir . 'contrib/videojs/video-js/video-js.css'); + $pageRenderer->addCssFile($this->getPathToLibrary('videojs/video-js/video-js.css')); // Add extended videoJS control bar - $pageRenderer->addJsFile(TYPO3_mainDir . 'contrib/videojs/video-js/controls/control-bar.js'); - $pageRenderer->addCssFile(TYPO3_mainDir . 'contrib/videojs/video-js/controls/control-bar.css'); + $pageRenderer->addJsFile($this->getPathToLibrary('videojs/video-js/controls/control-bar.js')); + $pageRenderer->addCssFile($this->getPathToLibrary('videojs/video-js/controls/control-bar.css')); // Build Flash configuration $player = isset($typeConf['player.']) ? $this->cObj->stdWrap($typeConf['player'], $typeConf['player.']) : $typeConf['player']; if (!$player) { - $player = $prefix . TYPO3_mainDir . 'contrib/flowplayer/flowplayer-3.2.16.swf'; + $player = $prefix . $this->getPathToLibrary('flowplayer/flowplayer-3.2.16.swf'); + } elseif (strpos($player, 'EXT:') === 0) { + $player = $GLOBALS['TSFE']->tmpl->getFileName($player); } $installUrl = isset($conf['installUrl.']) ? $this->cObj->stdWrap($conf['installUrl'], $conf['installUrl.']) : $conf['installUrl']; if (!$installUrl) { - $installUrl = $prefix . TYPO3_mainDir . 'contrib/flowplayer/expressinstall.swf'; + $installUrl = $prefix . $this->getPathToLibrary('flowplayer/expressinstall.swf'); } $flashVersion = isset($conf['flashVersion.']) ? $this->cObj->stdWrap($conf['flashVersion'], $conf['flashVersion.']) : $conf['flashVersion']; if (!$flashVersion) { @@ -350,7 +350,7 @@ class FlowPlayerContentObject extends AbstractContentObject { // Assemble captions track tag $videoCaptions = '<track id="' . $replaceElementIdString . '_captions_track" kind="captions" src="' . $conf['caption'] . '"></track>' . LF; // Add videoJS extension for captions - $pageRenderer->addJsFile(TYPO3_mainDir . 'contrib/videojs/video-js/controls/captions.js'); + $pageRenderer->addJsFile($this->getPathToLibrary('videojs/video-js/controls/captions.js')); // Flowplayer captions $conf['videoflashvars']['captionUrl'] = $conf['caption']; // Flowplayer captions plugin configuration @@ -364,7 +364,7 @@ class FlowPlayerContentObject extends AbstractContentObject { if ($conf['type'] == 'video') { if (is_array($conf['audioSources']) && count($conf['audioSources'])) { // Add videoJS audio description toggle - $pageRenderer->addJsFile(TYPO3_mainDir . 'contrib/videojs/video-js/controls/audio-description.js'); + $pageRenderer->addJsFile($this->getPathToLibrary('videojs/video-js/controls/audio-description.js')); } if (isset($conf['audioFallback'])) { // Audio description flowplayer config (remove controls) @@ -718,4 +718,13 @@ class FlowPlayerContentObject extends AbstractContentObject { return $content; } + /** + * resolves the path to the main contrib directory + * + * @param string $fileAndFolderName the file to be located + * @return string + */ + protected function getPathToLibrary($fileAndFolderName) { + return TYPO3_mainDir . 'contrib/' . $fileAndFolderName; + } } diff --git a/typo3/sysext/frontend/Classes/ContentObject/MediaContentObject.php b/typo3/sysext/mediace/Classes/ContentObject/MediaContentObject.php similarity index 98% rename from typo3/sysext/frontend/Classes/ContentObject/MediaContentObject.php rename to typo3/sysext/mediace/Classes/ContentObject/MediaContentObject.php index 83170068daf12e1a4ca70910027cddbdc1a5c6e5..f92f1e24d48e47c7eaff582dae830e4542ad73e6 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/MediaContentObject.php +++ b/typo3/sysext/mediace/Classes/ContentObject/MediaContentObject.php @@ -1,5 +1,5 @@ <?php -namespace TYPO3\CMS\Frontend\ContentObject; +namespace TYPO3\CMS\Mediace\ContentObject; /* * This file is part of the TYPO3 CMS project. @@ -20,7 +20,7 @@ namespace TYPO3\CMS\Frontend\ContentObject; * @author Xavier Perseguers <typo3@perseguers.ch> * @author Steffen Kamper <steffen@typo3.org> */ -class MediaContentObject extends AbstractContentObject { +class MediaContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractContentObject { /** * Rendering the cObject, MEDIA diff --git a/typo3/sysext/frontend/Classes/ContentObject/MultimediaContentObject.php b/typo3/sysext/mediace/Classes/ContentObject/MultimediaContentObject.php similarity index 96% rename from typo3/sysext/frontend/Classes/ContentObject/MultimediaContentObject.php rename to typo3/sysext/mediace/Classes/ContentObject/MultimediaContentObject.php index 97f45ef4ac54032523ca454716c753133c9e4b10..71be09b81048b3557d7f7a0fcba68ab4fcab16ff 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/MultimediaContentObject.php +++ b/typo3/sysext/mediace/Classes/ContentObject/MultimediaContentObject.php @@ -1,5 +1,5 @@ <?php -namespace TYPO3\CMS\Frontend\ContentObject; +namespace TYPO3\CMS\Mediace\ContentObject; /* * This file is part of the TYPO3 CMS project. @@ -20,7 +20,7 @@ namespace TYPO3\CMS\Frontend\ContentObject; * @author Xavier Perseguers <typo3@perseguers.ch> * @author Steffen Kamper <steffen@typo3.org> */ -class MultimediaContentObject extends AbstractContentObject { +class MultimediaContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractContentObject { /** * Rendering the cObject, MULTIMEDIA diff --git a/typo3/sysext/frontend/Classes/ContentObject/QuicktimeObjectContentObject.php b/typo3/sysext/mediace/Classes/ContentObject/QuicktimeObjectContentObject.php similarity index 86% rename from typo3/sysext/frontend/Classes/ContentObject/QuicktimeObjectContentObject.php rename to typo3/sysext/mediace/Classes/ContentObject/QuicktimeObjectContentObject.php index d3dcec6599fadf79bed4f63057a5028ffb3a8f9f..8edf29b090c6e686a46845c66f860394d1643390 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/QuicktimeObjectContentObject.php +++ b/typo3/sysext/mediace/Classes/ContentObject/QuicktimeObjectContentObject.php @@ -1,5 +1,5 @@ <?php -namespace TYPO3\CMS\Frontend\ContentObject; +namespace TYPO3\CMS\Mediace\ContentObject; /* * This file is part of the TYPO3 CMS project. @@ -17,12 +17,12 @@ namespace TYPO3\CMS\Frontend\ContentObject; use TYPO3\CMS\Core\Utility\ArrayUtility; /** - * Contains QTOBJECT class object. + * Contains QTOBJECT content object. * * @author Xavier Perseguers <typo3@perseguers.ch> * @author Steffen Kamper <steffen@typo3.org> */ -class QuicktimeObjectContentObject extends AbstractContentObject { +class QuicktimeObjectContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractContentObject { /** * Rendering the cObject, QTOBJECT @@ -51,7 +51,7 @@ class QuicktimeObjectContentObject extends AbstractContentObject { $typeConf = $conf[$type . '.']; // Add QTobject js-file - $GLOBALS['TSFE']->getPageRenderer()->addJsFile(TYPO3_mainDir . 'contrib/flashmedia/qtobject/qtobject.js'); + $GLOBALS['TSFE']->getPageRenderer()->addJsFile($this->getPathToLibrary('flashmedia/qtobject/qtobject.js')); $replaceElementIdString = str_replace('.', '', uniqid('mmqt', TRUE)); $GLOBALS['TSFE']->register['MMQTID'] = $replaceElementIdString; $qtObject = 'QTObject' . $replaceElementIdString; @@ -101,4 +101,13 @@ class QuicktimeObjectContentObject extends AbstractContentObject { return $content; } + /** + * resolves the path to the main contrib directory + * + * @param string $fileAndFolderName the file to be located + * @return string + */ + protected function getPathToLibrary($fileAndFolderName) { + return TYPO3_mainDir . 'contrib/' . $fileAndFolderName; + } } diff --git a/typo3/sysext/frontend/Classes/ContentObject/ShockwaveFlashObjectContentObject.php b/typo3/sysext/mediace/Classes/ContentObject/ShockwaveFlashObjectContentObject.php similarity index 90% rename from typo3/sysext/frontend/Classes/ContentObject/ShockwaveFlashObjectContentObject.php rename to typo3/sysext/mediace/Classes/ContentObject/ShockwaveFlashObjectContentObject.php index 8ba8df17d1f34c3ecbba43fd011df45dbb097ce6..02bdf76a5cb714d654764556466647297c9b06c9 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/ShockwaveFlashObjectContentObject.php +++ b/typo3/sysext/mediace/Classes/ContentObject/ShockwaveFlashObjectContentObject.php @@ -1,5 +1,5 @@ <?php -namespace TYPO3\CMS\Frontend\ContentObject; +namespace TYPO3\CMS\Mediace\ContentObject; /* * This file is part of the TYPO3 CMS project. @@ -17,12 +17,12 @@ namespace TYPO3\CMS\Frontend\ContentObject; use TYPO3\CMS\Core\Utility\ArrayUtility; /** - * Contains SWFOBJECT class object. + * Contains SWFOBJECT content object. * * @author Xavier Perseguers <typo3@perseguers.ch> * @author Steffen Kamper <steffen@typo3.org> */ -class ShockwaveFlashObjectContentObject extends AbstractContentObject { +class ShockwaveFlashObjectContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractContentObject { /** * Rendering the cObject, SWFOBJECT @@ -44,11 +44,11 @@ class ShockwaveFlashObjectContentObject extends AbstractContentObject { $pageRenderer = $GLOBALS['TSFE']->getPageRenderer(); // Add SWFobject js-file - $pageRenderer->addJsFile(TYPO3_mainDir . 'contrib/flashmedia/swfobject/swfobject.js'); + $pageRenderer->addJsFile($this->getPathToLibrary('flashmedia/swfobject/swfobject.js')); $player = isset($typeConf['player.']) ? $this->cObj->stdWrap($typeConf['player'], $typeConf['player.']) : $typeConf['player']; $installUrl = isset($conf['installUrl.']) ? $this->cObj->stdWrap($conf['installUrl'], $conf['installUrl.']) : $conf['installUrl']; if (!$installUrl) { - $installUrl = $prefix . TYPO3_mainDir . 'contrib/flashmedia/swfobject/expressInstall.swf'; + $installUrl = $prefix . $this->getPathToLibrary('flashmedia/swfobject/expressInstall.swf'); } // If file is audio and an explicit path has not been set, // take path from audio fallback property @@ -126,4 +126,14 @@ class ShockwaveFlashObjectContentObject extends AbstractContentObject { return $content; } + + /** + * resolves the path to the main contrib directory + * + * @param string $fileAndFolderName the file to be located + * @return string + */ + protected function getPathToLibrary($fileAndFolderName) { + return TYPO3_mainDir . 'contrib/' . $fileAndFolderName; + } } diff --git a/typo3/sysext/cms/flexform_media.xml b/typo3/sysext/mediace/Configuration/FlexForms/media.xml similarity index 100% rename from typo3/sysext/cms/flexform_media.xml rename to typo3/sysext/mediace/Configuration/FlexForms/media.xml diff --git a/typo3/sysext/mediace/Configuration/TCA/Overrides/tt_content.php b/typo3/sysext/mediace/Configuration/TCA/Overrides/tt_content.php new file mode 100644 index 0000000000000000000000000000000000000000..4d8ab9c8cf88f9a404b7c8eefad6c5142700fc94 --- /dev/null +++ b/typo3/sysext/mediace/Configuration/TCA/Overrides/tt_content.php @@ -0,0 +1,83 @@ +<?php +defined('TYPO3_MODE') or die(); + +/** + * Registering CType "media" and "multimedia" + */ +$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['multimedia'] = 'mimetypes-x-content-multimedia'; +$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['media'] = 'mimetypes-x-content-multimedia'; +$GLOBALS['TCA']['tt_content']['ctrl']['typeicons']['multimedia'] = 'tt_content_mm.gif'; +$GLOBALS['TCA']['tt_content']['ctrl']['typeicons']['media'] = 'tt_content_mm.gif'; + + +// Register new CType in item list just before "menu" +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', + array( + 'LLL:EXT:cms/locallang_ttc.xlf:CType.I.7', + 'multimedia', + 'i/tt_content_mm.gif' + ), + 'menu', 'before' +); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', + array( + 'LLL:EXT:cms/locallang_ttc.xlf:CType.I.18', + 'media', + 'i/tt_content_mm.gif' + ), + 'menu', 'before' +); + +// Add new field +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', array( + 'multimedia' => array( + 'label' => 'LLL:EXT:cms/locallang_ttc.xlf:multimedia', + 'config' => array( + 'type' => 'group', + 'internal_type' => 'file', + 'allowed' => 'txt,html,htm,class,swf,swa,dcr,wav,avi,au,mov,asf,mpg,wmv,mp3,mp4,m4v', + 'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'], + 'uploadfolder' => 'uploads/media', + 'size' => '2', + 'maxitems' => '1', + 'minitems' => '0' + ) + ) +)); + +// add type definition and palette +$GLOBALS['TCA']['tt_content']['types']['multimedia'] = array( + 'showitem' => '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general, + --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header, + --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.media, + --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.multimediafiles;multimediafiles, + --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance, + --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames, + --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, + --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.visibility;visibility, + --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access, + --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended' +); +$GLOBALS['TCA']['tt_content']['types']['media'] = array( + 'showitem' => '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general, + --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header, + --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.media, + pi_flexform, + --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance, + --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames, + --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, + --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.visibility;visibility, + --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access, + --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.behaviour, + bodytext;LLL:EXT:cms/locallang_ttc.xlf:bodytext.ALT.media_formlabel;;richtext:rte_transform[flag=rte_enabled|mode=ts_css], + --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended' +); + +$GLOBALS['TCA']['tt_content']['palettes']['multimediafiles'] = array( + 'showitem' => 'multimedia;LLL:EXT:cms/locallang_ttc.xlf:multimedia_formlabel, bodytext;LLL:EXT:cms/locallang_ttc.xlf:bodytext.ALT.multimedia_formlabel;;nowrap', + 'canNotCollapse' => 1 +); + + +// Add flexform +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('*', 'FILE:EXT:mediace/Configuration/FlexForms/media.xml', 'media'); diff --git a/typo3/sysext/mediace/Configuration/TypoScript/constants.txt b/typo3/sysext/mediace/Configuration/TypoScript/constants.txt new file mode 100644 index 0000000000000000000000000000000000000000..e38f28df195ca0ad4367fb14e954b8dbc608b768 --- /dev/null +++ b/typo3/sysext/mediace/Configuration/TypoScript/constants.txt @@ -0,0 +1,16 @@ +styles.content.media { + # cat=content/cMedia/j1; type=; label= Video Player: configure the path to the video player + videoPlayer = typo3/contrib/flashmedia/flvplayer.swf + # cat=content/cMedia/j2; type=int+; label= Media Video Width: define the default width for the media video + defaultVideoWidth = 600 + # cat=content/cMedia/j3; type=int+; label= Media Video Height: define the default height for the media video + defaultVideoHeight = 400 + # cat=content/cMedia/j4; type=; label= Audio Player: configure the path to the video player + audioPlayer = typo3/contrib/flashmedia/player.swf + # cat=content/cMedia/j5; type=int+; label= Media Audio Width: define the default width for the media audio + defaultAudioWidth = 300 + # cat=content/cMedia/j6; type=int+; label= Media Audio Height: define the default height for the media audio + defaultAudioHeight = 30 + # cat=content/cMedia/j7; type=; label= Flow Player: configure the path to the flow-player + flowPlayer = typo3/contrib/flowplayer/flowplayer-3.2.16.swf +} diff --git a/typo3/sysext/mediace/Configuration/TypoScript/setup.txt b/typo3/sysext/mediace/Configuration/TypoScript/setup.txt new file mode 100644 index 0000000000000000000000000000000000000000..26b626aac23cc1e5bf17ddaa13217ec033aa5dc9 --- /dev/null +++ b/typo3/sysext/mediace/Configuration/TypoScript/setup.txt @@ -0,0 +1,192 @@ +# ****************** +# CType: multimedia +# ****************** +tt_content.multimedia = COA +tt_content.multimedia { + 10 = < lib.stdheader + + 20 = MULTIMEDIA + 20.file.field = multimedia + 20.file.wrap = uploads/media/ + 20.file.listNum = 0 + 20.params.field = bodytext + + 20.stdWrap { + editIcons = tt_content: multimedia, bodytext + editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia + + prefixComment = 2 | Multimedia element: + } +} + +# ***************** +# CType: swfobject +# ***************** +tt_content.swfobject = COA +tt_content.swfobject { + 10 = < lib.stdheader + + 20 = SWFOBJECT + 20 { + file = + width = + height = + + flexParams.field = pi_flexform + + alternativeContent.field = bodytext + + layout = ###SWFOBJECT### + + video { + player = {$styles.content.media.videoPlayer} + + defaultWidth = {$styles.content.media.defaultVideoWidth} + defaultHeight = {$styles.content.media.defaultVideoHeight} + + default { + params.quality = high + params.menu = false + params.allowScriptAccess = sameDomain + params.allowFullScreen = true + } + mapping { + + } + } + + audio { + player = {$styles.content.media.audioPlayer} + + defaultWidth = {$styles.content.media.defaultAudioWidth} + defaultHeight = {$styles.content.media.defaultAudioHeight} + + default { + params.quality = high + params.allowScriptAccess = sameDomain + params.menu = false + } + mapping { + flashvars.file = soundFile + } + } + + } + 20.stdWrap { + editIcons = tt_content: multimedia, imagewidth, imageheight, pi_flexform, bodytext + editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia + + prefixComment = 2 | SWFobject element: + } +} + +# ***************** +# CType: qtobject +# ***************** +tt_content.qtobject = COA +tt_content.qtobject { + 10 = < lib.stdheader + + 20 = QTOBJECT + 20 { + file = + width = + height = + + flexParams.field = pi_flexform + + alternativeContent.field = bodytext + + layout = ###QTOBJECT### + + video { + player = {$styles.content.media.videoPlayer} + + defaultWidth = {$styles.content.media.defaultVideoWidth} + defaultHeight = {$styles.content.media.defaultVideoHeight} + + default { + params.quality = high + params.menu = false + params.allowScriptAccess = sameDomain + params.allowFullScreen = true + } + mapping { + + } + } + + audio { + player = {$styles.content.media.audioPlayer} + + defaultWidth = {$styles.content.media.defaultAudioWidth} + defaultHeight = {$styles.content.media.defaultAudioHeight} + + default { + params.quality = high + params.allowScriptAccess = sameDomain + params.menu = false + } + mapping { + flashvars.file = soundFile + } + } + } + 20.stdWrap { + editIcons = tt_content: multimedia, imagewidth, imageheight, pi_flexform, bodytext + editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia + + prefixComment = 2 | QTobject element: + } +} + +# ***************** +# CType: media +# ***************** +tt_content.media = COA +tt_content.media { + 10 = < lib.stdheader + + 20 = MEDIA + 20 { + + flexParams.field = pi_flexform + alternativeContent < tt_content.text.20 + alternativeContent.field = bodytext + + type = video + renderType = auto + allowEmptyUrl = 0 + forcePlayer = 1 + + fileExtHandler { + default = MEDIA + avi = MEDIA + asf = MEDIA + class = MEDIA + wmv = MEDIA + mp3 = SWF + mp4 = SWF + m4v = SWF + swa = SWF + flv = SWF + swf = SWF + mov = QT + m4v = QT + m4a = QT + } + + mimeConf.swfobject < tt_content.swfobject.20 + mimeConf.qtobject < tt_content.qtobject.20 + mimeConf.flowplayer < tt_content.swfobject.20 + mimeConf.flowplayer.audio.player = {$styles.content.media.flowPlayer} + mimeConf.flowplayer.video.player = {$styles.content.media.flowPlayer} + + } + 20.stdWrap { + editIcons = tt_content: pi_flexform, bodytext + editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia + + prefixComment = 2 | Media element: + } +} diff --git a/typo3/sysext/mediace/Migrations/Code/ClassAliasMap.php b/typo3/sysext/mediace/Migrations/Code/ClassAliasMap.php new file mode 100644 index 0000000000000000000000000000000000000000..7b9ee72f9396e198b55018c0c740135dc6689bb5 --- /dev/null +++ b/typo3/sysext/mediace/Migrations/Code/ClassAliasMap.php @@ -0,0 +1,8 @@ +<?php +return array( + 'TYPO3\\CMS\\Frontend\\ContentObject\\FlowplayerContentObject' => \TYPO3\CMS\Mediace\ContentObject\FlowplayerContentObject::class, + 'TYPO3\\CMS\\Frontend\\ContentObject\\MediaContentObject' => \TYPO3\CMS\Mediace\ContentObject\MediaContentObject::class, + 'TYPO3\\CMS\\Frontend\\ContentObject\\MultimediaContentObject' => \TYPO3\CMS\Mediace\ContentObject\MultimediaContentObject::class, + 'TYPO3\\CMS\\Frontend\\ContentObject\\QuicktimeObjectContentObject' => \TYPO3\CMS\Mediace\ContentObject\QuicktimeObjectContentObject::class, + 'TYPO3\\CMS\\Frontend\\ContentObject\\ShockwaveFlashObjectContentObject' => \TYPO3\CMS\Mediace\ContentObject\ShockwaveFlashObjectContentObject::class, +); diff --git a/typo3/sysext/mediace/Migrations/Code/LegacyClassesForIde.php b/typo3/sysext/mediace/Migrations/Code/LegacyClassesForIde.php new file mode 100644 index 0000000000000000000000000000000000000000..8d49b7503cc52db8f6205b21d84dbaa1483e210a --- /dev/null +++ b/typo3/sysext/mediace/Migrations/Code/LegacyClassesForIde.php @@ -0,0 +1,26 @@ +<?php +die('Access denied'); +/** + * @deprecated since 6.0, removed since 7.0 + */ +class tslib_content_FlowPlayer extends \TYPO3\CMS\Mediace\ContentObject\FlowPlayerContentObject {} + +/** + * @deprecated since 6.0, removed since 7.0 + */ +class tslib_content_Media extends \TYPO3\CMS\Mediace\ContentObject\MediaContentObject {} + +/** + * @deprecated since 6.0, removed since 7.0 + */ +class tslib_content_Multimedia extends \TYPO3\CMS\Mediace\ContentObject\MultimediaContentObject {} + +/** + * @deprecated since 6.0, removed since 7.0 + */ +class tslib_content_QuicktimeObject extends \TYPO3\CMS\Mediace\ContentObject\QuicktimeObjectContentObject {} + +/** + * @deprecated since 6.0, removed since 7.0 + */ +class tslib_content_ShockwaveFlashObject extends \TYPO3\CMS\Mediace\ContentObject\ShockwaveFlashObjectContentObject {} diff --git a/typo3/sysext/mediace/composer.json b/typo3/sysext/mediace/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..3e773da98b84afe388f80ababb95cfbc28fda805 --- /dev/null +++ b/typo3/sysext/mediace/composer.json @@ -0,0 +1,20 @@ +{ + "name": "typo3/cms-mediace", + "type": "typo3-cms-framework", + "description": "TYPO3 Core", + "homepage": "http://typo3.org", + "license": ["GPL-2.0+"], + "version": "7.1.0", + + "require": { + "typo3/cms-core": "*" + }, + "replace": { + "mediace": "*" + }, + "autoload": { + "psr-4": { + "TYPO3\\CMS\\Mediace\\": "Classes/" + } + } +} diff --git a/typo3/sysext/mediace/ext_emconf.php b/typo3/sysext/mediace/ext_emconf.php new file mode 100644 index 0000000000000000000000000000000000000000..c4c7e4eee2a6bc5db633a7249f908bb0716c053c --- /dev/null +++ b/typo3/sysext/mediace/ext_emconf.php @@ -0,0 +1,20 @@ +<?php +$EM_CONF[$_EXTKEY] = array( + 'title' => 'Media Content Element', + 'description' => 'The media functionality from TYPO3 6.2 and earlier can be found here. This extension provides ContentObjects and Content Elements.', + 'category' => 'fe', + 'author' => 'TYPO3 CMS Team', + 'author_email' => 'info@typo3.org', + 'state' => 'stable', + 'uploadfolder' => 0, + 'createDirs' => 'uploads/media', + 'clearCacheOnLoad' => 1, + 'version' => '7.1.0', + 'constraints' => array( + 'depends' => array( + 'typo3' => '7.1.0-7.9.99', + ), + 'conflicts' => array(), + 'suggests' => array(), + ) +); diff --git a/typo3/sysext/mediace/ext_icon.gif b/typo3/sysext/mediace/ext_icon.gif new file mode 100644 index 0000000000000000000000000000000000000000..6f39ea41ce893dc3e6e4e95882363ca068557db6 Binary files /dev/null and b/typo3/sysext/mediace/ext_icon.gif differ diff --git a/typo3/sysext/mediace/ext_localconf.php b/typo3/sysext/mediace/ext_localconf.php new file mode 100644 index 0000000000000000000000000000000000000000..9499bf49c0d8bbf8308e1d0e0c394c00f7ab228f --- /dev/null +++ b/typo3/sysext/mediace/ext_localconf.php @@ -0,0 +1,28 @@ +<?php +defined('TYPO3_MODE') or die(); + +if (TYPO3_MODE === 'FE') { + // Register additional content objects + $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['MULTIMEDIA'] = \TYPO3\CMS\Mediace\ContentObject\MultimediaContentObject::class; + $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['MEDIA'] = \TYPO3\CMS\Mediace\ContentObject\MediaContentObject::class; + $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['SWFOBJECT'] = \TYPO3\CMS\Mediace\ContentObject\ShockwaveFlashObjectContentObject::class; + $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['FLOWPLAYER'] = \TYPO3\CMS\Mediace\ContentObject\FlowPlayerContentObject::class; + $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['QTOBJECT'] = \TYPO3\CMS\Mediace\ContentObject\QuicktimeObjectContentObject::class; +} + +// Register the "media" CType to the "New Content Element" wizard +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' + mod.wizards.newContentElement.wizardItems { + special.elements.media { + icon = gfx/c_wiz/multimedia.gif + title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_media_title + description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_media_description + tt_content_defValues.CType = media + } + special.show := addToList(media) + } +'); + +// Add Default TypoScript for CType "media" and "multimedia" after default content rendering +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript('mediace', 'constants', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:mediace/Configuration/TypoScript/constants.txt">', 'defaultContentRendering'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript('mediace', 'setup', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:mediace/Configuration/TypoScript/setup.txt">', 'defaultContentRendering'); diff --git a/typo3/sysext/mediace/ext_tables.sql b/typo3/sysext/mediace/ext_tables.sql new file mode 100644 index 0000000000000000000000000000000000000000..cb43d52ee98021cb91c11f456968a81f5941f64f --- /dev/null +++ b/typo3/sysext/mediace/ext_tables.sql @@ -0,0 +1,6 @@ +# +# Table structure for table 'tt_content' +# +CREATE TABLE tt_content ( + multimedia tinytext +);