Feature #24421
closed
Need a hook/userfunction to extend allowedExtensions list in the media element
Added by Robert Heel almost 14 years ago.
Updated almost 11 years ago.
Description
... or extend the list with the following file extensions:
3gp,3g2,aac,mkv,oga,ogg,ogv,spx,webm
(issue imported from #M16851)
why do you need a hook for that?
Could be done easily with an extension that just changes the TCA settings for the field, or completely without an extension just with a setting made in extTables.php
AFAIK it isn't possible to change flexform configuration through TCA (would be useful...).
I think that's the reasen why there is already a user function to change mmRenderType field (typo3/sysext/cms/flexform_media.xml)
Take a look at this part of the tt_content TCA settings:
'pi_flexform' => array(
'l10n_display' => 'hideDiff',
'label' => 'LLL:EXT:cms/locallang_ttc.xml:pi_flexform',
'config' => array(
'type' => 'flex',
'ds_pointerField' => 'list_type,CType',
'ds' => array(
'default' => '
<T3DataStructure>
<ROOT>
<type>array</type>
<el>
<xmlTitle>
<TCEforms>
<label>The Title:</label>
<config>
<type>input</type>
<size>48</size>
</config>
</TCEforms>
</xmlTitle>
</el>
</ROOT>
</T3DataStructure>
',
',media' => file_get_contents(t3lib_extMgm::extPath('cms') .'flexform_media.xml'),
),
),
),
),
)
You can change it so that media will use your own XML file without having to use a hook or user function.
Yippee! Not as easy as changing other TCA fields, but it works :-)
Thank you Jo!
$xml=new SimpleXMLElement($TCA['tt_content']['columns']['pi_flexform']['config']['ds'][',media']);
$xml->sheets->sDEF->ROOT->el->mmFile->TCEforms->config->wizards->link->params->allowedExtensions.=',3gp,mkv,oga,ogg,ogv,spx,webm';
$TCA['tt_content']['columns']['pi_flexform']['config']['ds'][',media']=$xml->asXML();
- Status changed from New to Needs Feedback
- Target version deleted (
0)
Hi,
so we can close this issue?
- Status changed from Needs Feedback to Closed
Also available in: Atom
PDF