TYPO3 CMS  TYPO3_6-2
MultimediaContentObject.php
Go to the documentation of this file.
1 <?php
3 
23 
30  public function render($conf = array()) {
31  $content = '';
32  $filename = isset($conf['file.']) ? $this->cObj->stdWrap($conf['file'], $conf['file.']) : $conf['file'];
33  $incFile = $GLOBALS['TSFE']->tmpl->getFileName($filename);
34  if ($incFile) {
36  if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('txt,html,htm', $fileinfo['fileext'])) {
37  $content = $GLOBALS['TSFE']->tmpl->fileContent($incFile);
38  } else {
39  // Default params...
40  $parArray = array();
41  // Src is added
42  $width = isset($conf['width.']) ? $this->cObj->stdWrap($conf['width'], $conf['width.']) : $conf['width'];
43  if (!$width) {
44  $width = 200;
45  }
46  $height = isset($conf['height.']) ? $this->cObj->stdWrap($conf['height'], $conf['height.']) : $conf['height'];
47  if (!$height) {
48  $height = 200;
49  }
50  $parArray['src'] = 'src="' . $GLOBALS['TSFE']->absRefPrefix . $incFile . '"';
51  if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('au,wav,mp3', $fileinfo['fileext'])) {
52 
53  }
54  if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('avi,mov,mpg,asf,wmv', $fileinfo['fileext'])) {
55  $parArray['width'] = 'width="' . $width . '"';
56  $parArray['height'] = 'height="' . $height . '"';
57  }
58  if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('swf,swa,dcr', $fileinfo['fileext'])) {
59  $parArray['quality'] = 'quality="high"';
60  $parArray['width'] = 'width="' . $width . '"';
61  $parArray['height'] = 'height="' . $height . '"';
62  }
63  if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('class', $fileinfo['fileext'])) {
64  $parArray['width'] = 'width="' . $width . '"';
65  $parArray['height'] = 'height="' . $height . '"';
66  }
67  // fetching params
68  $params = isset($conf['params.']) ? $this->cObj->stdWrap($conf['params'], $conf['params.']) : $conf['params'];
69  $lines = explode(LF, $params);
70  foreach ($lines as $l) {
71  $parts = explode('=', $l);
72  $parameter = strtolower(trim($parts[0]));
73  $value = trim($parts[1]);
74  if ((string) $value != '') {
75  $parArray[$parameter] = $parameter . '="' . htmlspecialchars($value) . '"';
76  } else {
77  unset($parArray[$parameter]);
78  }
79  }
80  if ($fileinfo['fileext'] == 'class') {
81  unset($parArray['src']);
82  $parArray['code'] = 'code="' . htmlspecialchars($fileinfo['file']) . '"';
83  $parArray['codebase'] = 'codebase="' . htmlspecialchars($fileinfo['path']) . '"';
84  $content = '<applet ' . implode(' ', $parArray) . '></applet>';
85  } else {
86  $content = '<embed ' . implode(' ', $parArray) . '></embed>';
87  }
88  }
89  }
90  if (isset($conf['stdWrap.'])) {
91  $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
92  }
93  return $content;
94  }
95 
96 }
static split_fileref($fileNameWithPath)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]