Project

General

Profile

Actions

Feature #24421

closed

Need a hook/userfunction to extend allowedExtensions list in the media element

Added by Robert Heel about 13 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-12-27
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

Description

... or extend the list with the following file extensions:
3gp,3g2,aac,mkv,oga,ogg,ogv,spx,webm

(issue imported from #M16851)

Actions #1

Updated by Jo Hasenau about 13 years ago

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

Actions #2

Updated by Robert Heel about 13 years ago

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)

Actions #3

Updated by Jo Hasenau about 13 years ago

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.

Actions #4

Updated by Robert Heel about 13 years ago

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();

Actions #5

Updated by Alexander Opitz about 10 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

Hi,

so we can close this issue?

Actions #6

Updated by Robert Heel about 10 years ago

Yes :-)

Actions #7

Updated by Alexander Opitz about 10 years ago

  • Status changed from Needs Feedback to Closed
Actions

Also available in: Atom PDF