Project

General

Profile

Feature #24048 ยป tslib_content_MULTIMEDIA.diff

Administrator Admin, 2010-11-14 17:44

View differences:

typo3/sysext/cms/tslib/content/class.tslib_content_multimedia.php (revision )
*/
public function render($conf = array()) {
$content = '';
$filename = $this->cObj->stdWrap($conf['file'], $conf['file.']);
$filename = isset($conf['file.'])
? $this->cObj->stdWrap($conf['file'], $conf['file.'])
: $conf['file'];
$incFile = $GLOBALS['TSFE']->tmpl->getFileName($filename);
if ($incFile) {
$fileinfo = t3lib_div::split_fileref($incFile);
......
// default params...
$parArray = array();
// src is added
$width = isset($conf['width.'])
? $this->cObj->stdWrap($conf['width'], $conf['width.'])
: $conf['width'];
if(!$width) {
$width = 200;
}
$height = isset($conf['height.'])
? $this->cObj->stdWrap($conf['height'], $conf['height.'])
: $conf['height'];
if(!$height) {
$height = 200;
}
$parArray['src'] = 'src="' . $GLOBALS['TSFE']->absRefPrefix . $incFile . '"';
if (t3lib_div::inList('au,wav,mp3', $fileinfo['fileext'])) {
}
if (t3lib_div::inList('avi,mov,mpg,asf,wmv', $fileinfo['fileext'])) {
$parArray['width'] = 'width="' . ($conf['width'] ? $conf['width'] : 200) . '"';
$parArray['height'] = 'height="' . ($conf['height'] ? $conf['height'] : 200) . '"';
$parArray['width'] = 'width="' . $width . '"';
$parArray['height'] = 'height="' . $height . '"';
}
if (t3lib_div::inList('swf,swa,dcr', $fileinfo['fileext'])) {
$parArray['quality'] = 'quality="high"';
}
if (t3lib_div::inList('class', $fileinfo['fileext'])) {
$parArray['width'] = 'width="' . ($conf['width'] ? $conf['width'] : 200) . '"';
$parArray['height'] = 'height="' . ($conf['height'] ? $conf['height'] : 200) . '"';
$parArray['width'] = 'width="' . $width . '"';
$parArray['height'] = 'height="' . $height . '"';
}
// fetching params
$lines = explode(LF, $this->cObj->stdWrap($conf['params'], $conf['params.']));
$params = isset($conf['params.'])
? $this->cObj->stdWrap($conf['params'], $conf['params.'])
: $conf['params'];
$lines = explode(LF, $params);
foreach ($lines as $l) {
$parts = explode('=', $l);
$parameter = strtolower(trim($parts[0]));
......
}
}
if ($conf['stdWrap.']) {
if (isset($conf['stdWrap.'])) {
$content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
}
    (1-1/1)