Project

General

Profile

Feature #18017 » class.tx_cssstyledcontent_pi1_v3.2.diff

Administrator Admin, 2008-01-18 12:33

View differences:

class.tx_cssstyledcontent_pi1.php (working copy)
$this->cObj->setCurrentVal($path);
$GLOBALS['TSFE']->register['ICON_REL_PATH'] = $path.$fileName;
$filesData[$key]['linkedFilenameParts'] = explode('//**//',$this->cObj->filelink($fileName, $conf['linkProc.']));
if ($conf['transverseLinkText'] && $conf['cutOffExt']) {
$filesData[$key]['linkedFilenameParts'] = $this->transverseFileLinkText($filesData[$key]['linkedFilenameParts'],$fileName,true);
}
else if ($conf['transverseLinkText']) {
$filesData[$key]['linkedFilenameParts'] = $this->transverseFileLinkText($filesData[$key]['linkedFilenameParts'],$fileName,false);
}
}
}
......
}
}
}
/**
* Returns a Linktext String, which replaced Underlines in Filename with blanks.
* Has the possibility to cut off FileType
* @param string Links, Array with [0] Linked File-Icon, [1] Normal Filelink
* @param bool Switch, if true, Filetypes gets cut off
* @return string pared Linktext
*
*/
private function transverseFileLinktext($links,$fileName,$cutFileType=false) {
$linkText = str_replace('_',' ',$fileName);
if ($cutFileType) {
$pos =strrpos($linkText,'.');
$linkText = substr($linkText,0,$pos);
}
$links[1] = str_replace('>'.$fileName. '<','>'.$linkText.'<',$links[1]);
return $links;
}
}
(2-2/5)