Bug #19233 » rtehtmlarea_bugfix_9197_dam.patch
class.tx_dam_browse_media.php (copie de travail) | ||
---|---|---|
if ($type === 'db' AND $pArr[3]=='tx_dam') {
|
||
$isValid = true;
|
||
}
|
||
elseif ($type === 'file') {
|
||
} elseif ($type === 'file') {
|
||
$isValid = true;
|
||
}
|
||
elseif ($type === 'part_rte_linkfile') {
|
||
$isValid = true;
|
||
}
|
||
// elseif (method_exists($this, 'main_rte') AND $type === 'rte' AND $pObj->button == 'image') {
|
||
// $isValid = true;
|
||
// }
|
||
return $isValid;
|
||
}
|
compat/class.tx_dam_rtehtmlarea_browse_links.php (copie de travail) | ||
---|---|---|
|
||
protected $invokingObject;
|
||
protected $mode;
|
||
protected $act;
|
||
protected $bparams;
|
||
protected $isHtmlAreaRTE;
|
||
protected $isEnabled;
|
||
protected $browserRenderObj; // DAM browser object
|
||
|
||
/**
|
||
* initializes the hook object
|
||
... | ... | |
public function init($parentObject, $additionalParameters) {
|
||
$this->invokingObject =& $parentObject;
|
||
$this->mode =& $this->invokingObject->mode;
|
||
$this->act =& $this->invokingObject->act;
|
||
$this->bparams =& $this->invokingObject->bparams;
|
||
$invokingObjectClass = get_class($this->invokingObject);
|
||
$this->isHtmlAreaRTE = ($invokingObjectClass == 'tx_rtehtmlarea_browse_links' || $invokingObjectClass == 'ux_tx_rtehtmlarea_browse_links');
|
||
$this->isEnabled = ((string)$this->mode == 'rte') && $this->isHtmlAreaRTE;
|
||
if ($this->isEnabled) {
|
||
$this->invokingObject->anchorTypes[] = 'media';
|
||
|
||
}
|
||
}
|
||
|
||
... | ... | |
$content = '';
|
||
if ($this->isEnabled && $linkSelectorAction == 'media') {
|
||
$content .= $this->invokingObject->addAttributesForm();
|
||
$browserRenderObj = t3lib_div::makeInstance('tx_dam_browse_media');
|
||
if ($browserRenderObj->isValid('part_rte_linkfile', $this->invokingObject)) {
|
||
$content .= $browserRenderObj->renderPart('rte_linkfile', $this->invokingObject);
|
||
}
|
||
$this->initMediaBrowser();
|
||
$content .= $this->browserRenderObj->part_rte_linkfile();
|
||
$this->addDAMStylesAndJSArrays();
|
||
}
|
||
return $content;
|
||
}
|
||
... | ... | |
}
|
||
return $info;
|
||
}
|
||
protected function initMediaBrowser() {
|
||
$this->browserRenderObj = t3lib_div::makeInstance('tx_dam_browse_media');
|
||
$this->browserRenderObj->pObj =& $this->invokingObject;
|
||
$this->invokingObject->browser =& $this->browserRenderObj;
|
||
// init class browse_links
|
||
$this->browserRenderObj->init();
|
||
$this->browserRenderObj->mode =& $this->mode;
|
||
$this->browserRenderObj->act =& $this->act;
|
||
$this->browserRenderObj->bparams =& $this->bparams;
|
||
// init the DAM object
|
||
$this->browserRenderObj->initDAM();
|
||
// processes MOD_SETTINGS
|
||
$this->browserRenderObj->getModSettings();
|
||
// Processes bparams parameter
|
||
$this->browserRenderObj->processParams();
|
||
// init the DAM selection after we've got the params
|
||
$this->browserRenderObj->initDAMSelection();
|
||
}
|
||
protected function addDAMStylesAndJSArrays() {
|
||
$this->invokingObject->doc->inDocStylesArray = array_merge($this->invokingObject->doc->inDocStylesArray, $this->browserRenderObj->doc->inDocStylesArray);
|
||
$this->invokingObject->doc->JScodeArray = array_merge($this->invokingObject->doc->JScodeArray, $this->browserRenderObj->doc->JScodeArray);
|
||
}
|
||
}
|
||
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dam/compat/class.tx_dam_rtehtmlarea_browse_links.php']) {
|
ext_localconf.php (copie de travail) | ||
---|---|---|
if (t3lib_div::int_from_ver( TYPO3_version ) < 4003000) {
|
||
$TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php'] = PATH_txdam.'compat/class.ux_tx_rtehtmlarea_select_image.php';
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'][] = PATH_txdam.'compat/class.tx_dam_rtehtmlarea_select_image.php:&tx_dam_rtehtmlarea_select_image';
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.browse_links.php']['browseLinksHook'][] = PATH_txdam.'compat/class.tx_dam_rtehtmlarea_browse_links.php:&tx_dam_rtehtmlarea_browse_links';
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php']['browseLinksHook'][] = PATH_txdam.'compat/class.tx_dam_rtehtmlarea_browse_links.php:&tx_dam_rtehtmlarea_browse_links';
|
||
} else {
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php']['browseLinksHook'][] = PATH_txdam.'compat/class.tx_dam_rtehtmlarea_browse_media.php:&tx_dam_rtehtmlarea_browse_media';
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php']['browseLinksHook'][] = PATH_txdam.'compat/class.tx_dam_rtehtmlarea_browse_links.php:&tx_dam_rtehtmlarea_browse_links';
|
- « Previous
- 1
- 2
- 3
- Next »