Project

General

Profile

Feature #18017 » 7199_v6.diff

Administrator Admin, 2010-11-16 18:38

View differences:

typo3/sysext/css_styled_content/static/setup.txt (working copy)
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)
if ($conf['labelStdWrap.']) {
$conf['linkProc.']['labelStdWrap.'] = $conf['labelStdWrap.'];
}
if ($conf['useSpacesInLinkText'] || $conf['stripFileExtensionFromLinkText']) {
$conf['linkProc.']['removePrependedNumbers'] = 0;
}
// Traverse the files found:
$filesData = array();
......
$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
(5-5/5)