Project

General

Profile

Bug #14789 ยป htmlarea_dynamic.txt

Administrator Admin, 2005-06-02 16:10

 
# Excerpt from file tx_rtehtmlarea_base.php

/* =======================================
* LOAD CSS, JS and more
* =======================================
*/

// Preloading the pageStyle
if(trim($this->thisConfig['contentCSS'])) {
$filename = trim($this->thisConfig['contentCSS']);
if (substr($filename,0,4)=='EXT:') { // extension
list($extKey,$local) = explode('/',substr($filename,4),2);
$filename='';
if (strcmp($extKey,'') && t3lib_extMgm::isLoaded($extKey) && strcmp($local,'')) {

# __XXX__: This is the change
# Changed by Johannes Bornhold, bornhold@regio-institut.de:
$filename = $this->httpTypo3Path . t3lib_extMgm::siteRelPath($extKey).$local;
# was:
# $filename = '/' . t3lib_extMgm::siteRelPath($extKey).$local;
}
} elseif (substr($filename,0,1) != '/') {
$filename = $this->siteURL.$filename;
}
$pObj->additionalCode_pre['loadCSS'] = '
<link rel="alternate stylesheet" type="text/css" href="' . $filename . '" />';
} else {
$pObj->additionalCode_pre['loadCSS'] = '
<link rel="alternate stylesheet" type="text/css" href="' . $this->extHttpPath . 'htmlarea/plugins/DynamicCSS/dynamiccss.css" />';
}

// Loading the editor skin
$skinFilename = trim($this->thisConfig['skin']) ? trim($this->thisConfig['skin']) : 'EXT:' . $this->ID . '/htmlarea/skins/default/htmlarea.css';
if (substr($skinFilename,0,4) == 'EXT:') { // extension
list($extKey,$local) = explode('/',substr($skinFilename,4),2);
$skinFilename='';
if (strcmp($extKey,'') && t3lib_extMgm::isLoaded($extKey) && strcmp($local,'')) {

# __XXX__: The following line was my inspiration
$skinFilename = $this->httpTypo3Path.t3lib_extMgm::siteRelPath($extKey).$local;
}
} elseif (substr($skinFilename,0,1) != '/') {
$skinFilename = $this->siteURL.$skinFilename;
}
$this->editorCSS = $skinFilename;
$pObj->additionalCode_pre['loadCSS'] .= '
<link rel="alternate stylesheet" type="text/css" href="' . dirname($this->editorCSS) . '/htmlarea-edited-content.css" />';
$pObj->additionalCode_pre['loadCSS'] .= '
<link rel="stylesheet" type="text/css" href="' . $this->editorCSS . '" />';
    (1-1/1)