Commit 492cead4 authored by Frans Saris's avatar Frans Saris Committed by Philipp Gampe
Browse files

[FEATURE] Introduce $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext']

Releases: master
Resolves: #69543
Change-Id: I676a20fd64a13e6f04774fe2fa838c5b51d6eaf0
Reviewed-on: http://review.typo3.org/43045

Reviewed-by: default avatarDaniel Goerz <ervaude@gmail.com>
Tested-by: default avatarDaniel Goerz <ervaude@gmail.com>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Mathias Schreiber's avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber's avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Philipp Gampe's avatarPhilipp Gampe <philipp.gampe@typo3.org>
Tested-by: Philipp Gampe's avatarPhilipp Gampe <philipp.gampe@typo3.org>
parent 4679e1e2
......@@ -86,6 +86,7 @@ return array(
*/
'curlTimeout' => 0, // Integer: Timeout value for cURL requests in seconds. 0 means to wait indefinitely. Deprecated since 4.6 - will be removed in 6.2. See below for http options.
'textfile_ext' => 'txt,ts,html,htm,css,tmpl,js,sql,xml,csv,xlf', // Text file extensions. Those that can be edited. Executable PHP files may not be editable in webspace if disallowed!
'mediafile_ext' => 'gif,jpg,jpeg,bmp,png,pdf,svg,ai,mov,avi',// Commalist of file extensions perceived as media files by TYPO3. Lowercase and no spaces between!
'binPath' => '', // String: List of absolute paths where external programs should be searched for. Eg. <code>/usr/local/webbin/,/home/xyz/bin/</code>. (ImageMagick path have to be configured separately)
'binSetup' => '', // String (textarea): List of programs (separated by newline or comma). By default programs will be searched in default paths and the special paths defined by 'binPath'. When PHP has openbasedir enabled the programs can not be found and have to be configured here. Example: <code>perl=/usr/bin/perl,unzip=/usr/local/bin/unzip</code>
't3lib_cs_convMethod' => '', // String (values: "iconv", "recode", "mbstring", default is homemade PHP-code). Defines which of these PHP-features to use for various charset conversion functions in \TYPO3\CMS\Core\Charset\CharsetConverter. Will speed up charset conversion radically.
......
================================================================================
Feature: #69543 - Introduced $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext']
================================================================================
Description
===========
Now we got the ``RendererRegistry`` with the ``VideoTagRenderer``, ``AudioTagRenderer`` and ``MediaViewHelper`` in the
core we needed also a way to define a list of file extensions of the files that can be handled by these. This list
can then be used in the TCA for allowing sys_file_references to these files.
.. code-block:: php
// Comma list of file extensions perceived as media files by TYPO3.
// Lowercase and no spaces between
$GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'] = 'gif,jpg,jpeg,bmp,png,pdf,svg,ai,mov,avi';
TCA example:
------------
.. code-block:: php
'media' => array(
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.media',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('media', array(
'foreign_types' => array(
'0' => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
)
)
), $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'])
),
Extending this list:
--------------------
If you want to extend this list you can add the desired extension name to list in the ``ext_localconf.php`` of your extension.
.. code-block:: php
$GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'] .= ',myext';
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment