Feature #18017 » 7199_v4.diff
typo3/sysext/css_styled_content/static/setup.txt (working copy) | ||
---|---|---|
addChr10BetweenParagraphs=1
|
||
}
|
||
div.stripNL = 1
|
||
div.callRecursive = 1
|
||
div.callRecursive = 1
|
||
}
|
||
nonTypoTagStdWrap.encapsLines {
|
||
encapsTagList = p,pre,h1,h2,h3,h4,h5,h6
|
||
... | ... | |
30.bytes = 1
|
||
30.bytes.labels = {$styles.content.uploads.filesizeBytesLabels}
|
||
}
|
||
useSpacesInLinkText = 0
|
||
stripFileExtensionFromLinkText = 0
|
||
}
|
||
20.color {
|
typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php (working copy) | ||
---|---|---|
$GLOBALS['TSFE']->register['fileSize'] = $filesData[$key]['filesize'];
|
||
$GLOBALS['TSFE']->register['fileExtension'] = $filesData[$key]['fileextension'];
|
||
$GLOBALS['TSFE']->register['description'] = $filesData[$key]['description'];
|
||
$filesData[$key]['linkedFilenameParts'] = explode('//**//',$this->cObj->filelink($fileName, $conf['linkProc.']));
|
||
$filesData[$key]['linkedFilenameParts']
|
||
= $this->beautifyFileLink(
|
||
explode(
|
||
'//**//',
|
||
$this->cObj->filelink(
|
||
$fileName, $conf['linkProc.']
|
||
)
|
||
),
|
||
$fileName,
|
||
$conf['useSpacesInLinkText'],
|
||
$conf['stripFileExtensionFromLinkText']
|
||
);
|
||
}
|
||
}
|
||
... | ... | |
************************************/
|
||
/**
|
||
* Returns a link text string which replaces underscores in filename with
|
||
* blanks.
|
||
*
|
||
* Has the possibility to cut off FileType.
|
||
* @param array $links
|
||
* array with [0] linked file icon, [1] text link
|
||
* @param string $fileName
|
||
* the name of the file to be linked (without path)
|
||
* @param boolean $useSpaces
|
||
* whether underscores in the file name should be replaced with spaces
|
||
* @param boolean $cutFileExtension
|
||
* whether the file extension should be removed
|
||
*
|
||
* @return array modified array with new link text
|
||
*/
|
||
protected function beautifyFileLink(
|
||
array $links, $fileName, $useSpaces = FALSE, $cutFileExtension = FALSE
|
||
) {
|
||
$linkText = $fileName;
|
||
if ($useSpaces) {
|
||
$linkText = str_replace('_', ' ', $linkText);
|
||
}
|
||
if ($cutFileExtension) {
|
||
$pos = strrpos($linkText, '.');
|
||
$linkText = substr($linkText, 0, $pos);
|
||
}
|
||
$links[1] = str_replace(
|
||
'>' . $fileName . '<', '>' . $linkText . '<', $links[1]
|
||
);
|
||
return $links;
|
||
}
|
||
/**
|
||
* Returns table attributes for uploads / tables.
|
||
*
|
||
* @param array TypoScript configuration array
|