30 public function render($conf = array()) {
31 $params = ($prefix =
'');
35 if (
$GLOBALS[
'TSFE']->absRefPrefix) {
36 $prefix =
$GLOBALS[
'TSFE']->absRefPrefix;
38 $type = isset($conf[
'type.']) ? $this->cObj->stdWrap($conf[
'type'], $conf[
'type.']) : $conf[
'type'];
42 if ($type ==
'audio' && empty($conf[
'file'])) {
43 $conf[
'file'] = $conf[
'audioFallback'];
45 $filename = isset( $conf[
'file.'])
46 ? $this->cObj->stdWrap($conf[
'file'], $conf[
'file.'])
49 $typeConf = $conf[$type .
'.'];
51 $GLOBALS[
'TSFE']->getPageRenderer()->addJsFile(TYPO3_mainDir .
'contrib/flashmedia/qtobject/qtobject.js');
52 $replaceElementIdString = str_replace(
'.',
'', uniqid(
'mmqt', TRUE));
53 $GLOBALS[
'TSFE']->register[
'MMQTID'] = $replaceElementIdString;
54 $qtObject =
'QTObject' . $replaceElementIdString;
56 $conf[
'params.'] = array_merge((array) $typeConf[
'default.'][
'params.'], (array) $conf[
'params.']);
57 if (is_array($conf[
'params.'])) {
59 foreach ($conf[
'params.'] as $key => $value) {
60 $params .= $qtObject .
'.addParam("' . $key .
'", "' . $value .
'");' . LF;
63 $params = ($params ? substr($params, 0, -2) :
'') . LF . $qtObject .
'.write("' . $replaceElementIdString .
'");';
64 $alternativeContent = isset($conf[
'alternativeContent.']) ? $this->cObj->stdWrap($conf[
'alternativeContent'], $conf[
'alternativeContent.']) : $conf[
'alternativeContent'];
65 $layout = str_replace(
71 $replaceElementIdString,
72 '<div id="' . $replaceElementIdString .
'">' . $alternativeContent .
'</div>' 74 isset($conf[
'layout.']) ? $this->cObj->stdWrap($conf[
'layout'], $conf[
'layout.']) : $conf[
'layout']
76 $width = isset($conf[
'width.']) ? $this->cObj->stdWrap($conf[
'width'], $conf[
'width.']) : $conf[
'width'];
78 $width = $conf[$type .
'.'][
'defaultWidth'];
80 $height = isset($conf[
'height.']) ? $this->cObj->stdWrap($conf[
'height'], $conf[
'height.']) : $conf[
'height'];
82 $height = $conf[$type .
'.'][
'defaultHeight'];
84 $fullFilename = $filename;
86 if (strpos($filename,
'://') === FALSE && !empty($prefix)) {
87 $fullFilename = $prefix . $filename;
89 $embed =
'var ' . $qtObject .
' = new QTObject("' . $fullFilename .
'", "' . $replaceElementIdString .
'", "' . $width .
'", "' . $height .
'");';
90 $content = $layout .
' 91 <script type="text/javascript"> 95 if (isset($conf[
'stdWrap.'])) {
96 $content = $this->cObj->stdWrap($content, $conf[
'stdWrap.']);
static remapArrayKeys(&$array, $mappingTable)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]