Index: typo3/sysext/cms/tslib/content/class.tslib_content_media.php =================================================================== --- typo3/sysext/cms/tslib/content/class.tslib_content_media.php (revision 9291) +++ typo3/sysext/cms/tslib/content/class.tslib_content_media.php (revision ) @@ -36,22 +36,28 @@ class tslib_content_Media extends tslib_content_Abstract { /** - * Rendering the cObject, TEXT + * Rendering the cObject, MEDIA * * @param array Array of TypoScript properties * @return string Output */ public function render($conf = array()) { $content = ''; - $flexParams = $this->cObj->stdWrap($conf['flexParams'], $conf['flexParams.']); + $flexParams = isset($conf['flexParams.']) + ? $this->cObj->stdWrap($conf['flexParams'], $conf['flexParams.']) + : $conf['flexParams']; if (substr($flexParams, 0, 1) === '<') { // it is a content element $this->cObj->readFlexformIntoConf($flexParams, $conf['parameter.']); - $url = $conf['parameter.']['mmFile']; - $url = $this->cObj->stdWrap($url, $conf['file.']); + $url = isset($conf['file.']) + ? $this->cObj->stdWrap($conf['parameter.']['mmFile'], $conf['file.']) + : $conf['parameter.']['mmFile']; + $mmFile = $url; } else { // it is a TS object - $url = $this->cObj->stdWrap($conf['file'], $conf['file.']); + $url = isset($conf['file.']) + ? $this->cObj->stdWrap($conf['file'], $conf['file.']) + : $conf['file']; } $mode = is_file(PATH_site . $url) ? 'file' : 'url'; @@ -72,9 +78,14 @@ )); } - $renderType = $conf['renderType']; - if (isset($conf['parameter.']['mmRenderType'])) { - $renderType = $conf['parameter.']['mmRenderType']; + $renderType = isset($conf['renderType.']) + ? $this->cObj->stdWrap($conf['renderType'], $conf['renderType.']) + : $conf['renderType']; + $mmRenderType = isset($conf['parameter.']['mmRenderType.']) + ? $this->cObj->stdWrap($conf['parameter.']['mmRenderType'], $conf['parameter.']['mmRenderType.']) + : $conf['parameter.']['mmRenderType']; + if ($mmRenderType) { + $renderType = $mmRenderType; } if ($renderType === 'auto') { // default renderType is swf @@ -85,25 +96,49 @@ } } - $forcePlayer = isset($conf['parameter.']['mmFile']) ? intval($conf['parameter.']['mmforcePlayer']) : $conf['forcePlayer']; - $conf['forcePlayer'] = $forcePlayer; + $mmForcePlayer = isset($conf['parameter.']['mmforcePlayer.']) + ? $this->cObj->stdWrap($conf['parameter.']['mmforcePlayer'], $conf['parameter.']['mmforcePlayer.']) + : $conf['parameter.']['mmforcePlayer']; - $conf['type'] = isset($conf['parameter.']['mmType']) ? $conf['parameter.']['mmType'] : $conf['type']; + $forcePlayer = $mmFile ? intval($mmForcePlayer) : $conf['forcePlayer']; + $conf['forcePlayer'] = isset($conf['forcePlayer.']) + ? $this->cObj->stdWrap($forcePlayer, $conf['forcePlayer.']) + : $forcePlayer; + + $mmType = isset($conf['parameter.']['mmType.']) + ? $this->cObj->stdWrap($conf['parameter.']['mmType'], $conf['parameter.']['mmType.']) + : $conf['parameter.']['mmType']; + + $type = isset($conf['type.']) + ? $this->cObj->stdWrap($conf['type'], $conf['type.']) + : $conf['type']; + + $conf['type'] = $mmType ? $mmType : $type; $mime = $renderType . 'object'; $typeConf = $conf['mimeConf.'][$mime . '.'][$conf['type'] . '.'] ? $conf['mimeConf.'][$mime . '.'][$conf['type'] . '.'] : array(); $conf['predefined'] = array(); - $width = intval($conf['parameter.']['mmWidth']); - $height = intval($conf['parameter.']['mmHeight']); + $width = isset($conf['parameter.']['mmWidth.']) + ? intval($this->cObj->stdWrap($conf['parameter.']['mmWidth'], $conf['parameter.']['mmWidth.'])) + : intval($conf['parameter.']['mmWidth']); + $height = isset($conf['parameter.']['mmHeight.']) + ? intval($this->cObj->stdWrap($conf['parameter.']['mmHeight'], $conf['parameter.']['mmHeight.'])) + : intval($conf['parameter.']['mmHeight']); if ($width) { $conf['width'] = $width; } else { - $conf['width'] = intval($conf['width']) ? $conf['width'] : $typeConf['defaultWidth']; + $width = isset($conf['width.']) + ? intval($this->cObj->stdWrap($conf['width'], $conf['width.'])) + : intval($conf['width']); + $conf['width'] = $width ? $width : $typeConf['defaultWidth']; } if ($height) { $conf['height'] = $height; } else { - $conf['height'] = intval($conf['height']) ? $conf['height'] : $typeConf['defaultHeight']; + $height = isset($conf['height.']) + ? intval($this->cObj->stdWrap($conf['height'], $conf['height.'])) + : intval($conf['width']); + $conf['height'] = $height ? $height : $typeConf['defaultHeight']; } if (is_array($conf['parameter.']['mmMediaOptions'])) { @@ -196,7 +231,7 @@ } } - if ($conf['stdWrap.']) { + if (isset($conf['stdWrap.'])) { $content = $this->cObj->stdWrap($content, $conf['stdWrap.']); }