From d813c9a48024147fe56e28287c3bc67dcf7bf98c Mon Sep 17 00:00:00 2001 From: Benjamin Mack <benni@typo3.org> Date: Mon, 2 Feb 2015 21:25:41 +0100 Subject: [PATCH] [TASK] Move Media cObject and CTypes to new extension In order to separate features and also consolidate code for specific features into one place, a new system extension is created. The extension "mediace" ships with the core (not installed by default) for now but could be moved to TER in future releases. Next steps are: - move third-party files from typo3/contrib/ to EXT:mediace - find a proper solution to move the MediaWizard provider - (optionally) create a Update Wizard that checks if the system uses media or multimedia elements or the "multimedia" and install the extension automatically. Change-Id: I312ba6c15fece3a1319de23c085790590a659755 Resolves: #64719 Releases: master Reviewed-on: http://review.typo3.org/36572 Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de> --- typo3/sysext/cms/ext_localconf.php | 18 +- ...719-MediaContentMovedToSystemExtension.rst | 39 ++++ .../css_styled_content/ext_localconf.php | 5 +- .../css_styled_content/pageTSconfig.txt | 11 - .../css_styled_content/static/constants.txt | 17 -- .../css_styled_content/static/setup.txt | 193 ------------------ .../frontend/Configuration/TCA/tt_content.php | 76 +------ .../ContentObjectRendererTest.php | 5 - typo3/sysext/frontend/ext_tables.sql | 1 - .../ContentObject/FlowPlayerContentObject.php | 39 ++-- .../ContentObject/MediaContentObject.php | 4 +- .../ContentObject/MultimediaContentObject.php | 4 +- .../QuicktimeObjectContentObject.php | 17 +- .../ShockwaveFlashObjectContentObject.php | 20 +- .../Configuration/FlexForms/media.xml} | 0 .../TCA/Overrides/tt_content.php | 83 ++++++++ .../Configuration/TypoScript/constants.txt | 16 ++ .../Configuration/TypoScript/setup.txt | 192 +++++++++++++++++ .../mediace/Migrations/Code/ClassAliasMap.php | 8 + .../Migrations/Code/LegacyClassesForIde.php | 26 +++ typo3/sysext/mediace/composer.json | 20 ++ typo3/sysext/mediace/ext_emconf.php | 20 ++ typo3/sysext/mediace/ext_icon.gif | Bin 0 -> 234 bytes typo3/sysext/mediace/ext_localconf.php | 28 +++ typo3/sysext/mediace/ext_tables.sql | 6 + 25 files changed, 508 insertions(+), 340 deletions(-) create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Breaking-64719-MediaContentMovedToSystemExtension.rst delete mode 100644 typo3/sysext/css_styled_content/pageTSconfig.txt rename typo3/sysext/{frontend => mediace}/Classes/ContentObject/FlowPlayerContentObject.php (95%) rename typo3/sysext/{frontend => mediace}/Classes/ContentObject/MediaContentObject.php (98%) rename typo3/sysext/{frontend => mediace}/Classes/ContentObject/MultimediaContentObject.php (96%) rename typo3/sysext/{frontend => mediace}/Classes/ContentObject/QuicktimeObjectContentObject.php (86%) rename typo3/sysext/{frontend => mediace}/Classes/ContentObject/ShockwaveFlashObjectContentObject.php (90%) rename typo3/sysext/{cms/flexform_media.xml => mediace/Configuration/FlexForms/media.xml} (100%) create mode 100644 typo3/sysext/mediace/Configuration/TCA/Overrides/tt_content.php create mode 100644 typo3/sysext/mediace/Configuration/TypoScript/constants.txt create mode 100644 typo3/sysext/mediace/Configuration/TypoScript/setup.txt create mode 100644 typo3/sysext/mediace/Migrations/Code/ClassAliasMap.php create mode 100644 typo3/sysext/mediace/Migrations/Code/LegacyClassesForIde.php create mode 100644 typo3/sysext/mediace/composer.json create mode 100644 typo3/sysext/mediace/ext_emconf.php create mode 100644 typo3/sysext/mediace/ext_icon.gif create mode 100644 typo3/sysext/mediace/ext_localconf.php create mode 100644 typo3/sysext/mediace/ext_tables.sql diff --git a/typo3/sysext/cms/ext_localconf.php b/typo3/sysext/cms/ext_localconf.php index fb88918bba49..4bb58479c4f6 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 000000000000..c129b79e749a --- /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 7b0381550b73..f5bb9e3f6b78 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 db898a4e020a..000000000000 --- 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 86a02b927873..3515cd165339 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 3ba0d83f533c..3d11d4d40715 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 2d99a91663c3..5db300283b2f 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 2edade85c9dc..48a36509a401 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 167058281b23..4613d3ba57d4 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 e8c1f54ae05f..9edc9b9ca94d 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 83170068daf1..f92f1e24d48e 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 97f45ef4ac54..71be09b81048 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 d3dcec6599fa..8edf29b090c6 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 8ba8df17d1f3..02bdf76a5cb7 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 000000000000..4d8ab9c8cf88 --- /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 000000000000..e38f28df195c --- /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 000000000000..26b626aac23c --- /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 000000000000..7b9ee72f9396 --- /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 000000000000..8d49b7503cc5 --- /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 000000000000..3e773da98b84 --- /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 000000000000..c4c7e4eee2a6 --- /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 GIT binary patch literal 234 zcmZ?wbh9u|lwgox_{`1l9|&e@Y)xP&tE&Cq&JY$Elesj&r-|X_%M1Vh{d@cQ{r~M5 z3`jr+#0KeQV3~j6gy-t1$CsSl{oiAnMoQ+q^c4$rR`+EnY<VgzY`peHn!|&x)`E;j z6KnQIE@x2w$aG@KN&^iM*W>fc)Rr)<GF{`OaDhp<l_`n&UZ-d3%IPy58hSsZRQ3Kd zx~r|8S}e_xX;7hBEzMfz+sV~Z+8*B6#az=H>g$)UlEK_MMRVT#xY>G3m#tViO+91I cl6C8?^f|Wg*tu)BB>TSo2M!+EC&*w80LE}*Jpcdz literal 0 HcmV?d00001 diff --git a/typo3/sysext/mediace/ext_localconf.php b/typo3/sysext/mediace/ext_localconf.php new file mode 100644 index 000000000000..9499bf49c0d8 --- /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 000000000000..cb43d52ee980 --- /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 +); -- GitLab