Index: typo3/sysext/css_styled_content/static/setup.txt =================================================================== --- typo3/sysext/css_styled_content/static/setup.txt (Revision 8768) +++ typo3/sysext/css_styled_content/static/setup.txt (Arbeitskopie) @@ -120,7 +120,7 @@ addChr10BetweenParagraphs=1 } div.stripNL = 1 - div.callRecursive = 1 + div.callRecursive = 1 } nonTypoTagStdWrap.encapsLines { encapsTagList = p,pre,h1,h2,h3,h4,h5,h6 @@ -304,7 +304,7 @@ stdWrap { prioriCalc = intval - wrap = margin-bottom:|px; + wrap = margin-bottom:|px; required = 1 ifEmpty.value = } @@ -316,7 +316,7 @@ 30 = TEXT 30.value = >| } - + 1 =< tt_content.stdWrap.innerWrap.cObject.default 1.15.value = csc-frame csc-frame-invisible @@ -340,7 +340,7 @@ 21 =< tt_content.stdWrap.innerWrap.cObject.default 21.15.value = csc-frame csc-frame-frame2 - + 66 = COA 66 { 10 = TEXT @@ -348,7 +348,7 @@ value = insertData = 1 } - + 20 = COA 20 { 10 = TEXT @@ -371,12 +371,12 @@ wrap2 =
} } - + 30 = TEXT 30 { value = | } - + 40 < .20 40 { 10 { @@ -387,13 +387,13 @@ stdWrap.wrap = margin-bottom:|px; } } - + } - + innerWrap2 = |

{LLL:EXT:css_styled_content/pi1/locallang.xml:label.toTop}

innerWrap2.insertData = 1 innerWrap2.fieldRequired = linkToTop - + prepend = TEXT prepend.dataWrap = prepend.if.isTrue.field = _LOCALIZED_UID @@ -651,7 +651,7 @@ } value = ul } - + # Multiple images and no caption at all => "ul" 30 = TEXT 30 { @@ -765,7 +765,7 @@ 1.current = 1 1.parseFunc =< lib.parseFunc 1.wrap =
  • |
  • - + 2.current = 1 2.parseFunc =< lib.parseFunc 2.wrap =
  • |
  • @@ -774,7 +774,7 @@ editIcons = tt_content: bodytext, [layout] editIcons.beforeLastTag = 1 editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.php:eIcon.bullets - + prefixComment = 2 | Bullet list: } } @@ -876,6 +876,8 @@ 30.bytes = 1 30.bytes.labels = {$styles.content.uploads.filesizeBytesLabels} } + useSpacesInLinkText = 1 + stripFileExtensionFromLinkText = 1 } 20.color { @@ -960,22 +962,22 @@ 20 = SWFOBJECT 20 { - file = - width = + file = + width = height = - + flexParams.field = pi_flexform - + alternativeContent.field = bodytext - + layout = ###SWFOBJECT### - + video { player = {$styles.content.media.videoPlayer} - + defaultWidth = {$styles.content.media.defaultVideoWidth} defaultHeight = {$styles.content.media.defaultVideoHeight} - + default { params.quality = high params.menu = false @@ -983,16 +985,16 @@ params.allowFullScreen = true } mapping { - + } } - + audio { player = {$styles.content.media.audioPlayer} - + defaultWidth = {$styles.content.media.defaultAudioWidth} defaultHeight = {$styles.content.media.defaultAudioHeight} - + default { params.quality = high params.allowScriptAccess = sameDomain @@ -1002,14 +1004,14 @@ flashvars.file = soundFile } } - + } 20.stdWrap { editIcons = tt_content: multimedia, imagewidth, imageheight, pi_flexform, bodytext editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xml:eIcon.multimedia prefixComment = 2 | SWFobject element: - } + } } # ***************** @@ -1021,22 +1023,22 @@ 20 = QTOBJECT 20 { - file = - width = + file = + width = height = - - flexParams.field = pi_flexform - + + flexParams.field = pi_flexform + alternativeContent.field = bodytext - + layout = ###QTOBJECT### - + video { player = {$styles.content.media.videoPlayer} - + defaultWidth = {$styles.content.media.defaultVideoWidth} defaultHeight = {$styles.content.media.defaultVideoHeight} - + default { params.quality = high params.menu = false @@ -1044,16 +1046,16 @@ params.allowFullScreen = true } mapping { - + } } - + audio { player = {$styles.content.media.audioPlayer} - + defaultWidth = {$styles.content.media.defaultAudioWidth} defaultHeight = {$styles.content.media.defaultAudioHeight} - + default { params.quality = high params.allowScriptAccess = sameDomain @@ -1069,7 +1071,7 @@ editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xml:eIcon.multimedia prefixComment = 2 | QTobject element: - } + } } # ***************** @@ -1081,16 +1083,16 @@ 20 = MEDIA 20 { - + flexParams.field = pi_flexform alternativeContent < tt_content.text.20 alternativeContent.field = bodytext - + type = video renderType = auto allowEmptyUrl = 0 forcePlayer = 1 - + fileExtHandler { default = MEDIA avi = MEDIA @@ -1107,17 +1109,17 @@ m4v = QT m4a = QT } - + mimeConf.swfobject < tt_content.swfobject.20 mimeConf.qtobject < tt_content.qtobject.20 - + } 20.stdWrap { editIcons = tt_content: pi_flexform, bodytext editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xml:eIcon.multimedia prefixComment = 2 | Media element: - } + } } # ****************** @@ -1149,7 +1151,7 @@ recipient.field = subheader data.field = bodytext locationData = 1 - + params.radio = class="csc-mailform-radio" params.check = class="csc-mailform-check" params.submit = class="csc-mailform-submit" @@ -1417,7 +1419,7 @@ special = directory wrap = } - + # "Sitemap - liststyle" 2 = HMENU 2 { @@ -1441,7 +1443,7 @@ 6 < .1 7 < .1 } - + # "Section index (pagecontent w/Index checked - liststyle)" 3 < styles.content.get 3 { @@ -1460,7 +1462,7 @@ typolink.section.field = uid } } - + # "Menu of subpages to these pages (with abstract)" 4 < .1 4 { @@ -1477,7 +1479,7 @@ ATagTitle.field = description // title } } - + # "Recently updated pages" 5 < .default 5 { @@ -1488,7 +1490,7 @@ excludeNoSearchPages = 1 } } - + # "Related pages (based on keywords)" 6 < .default 6 { @@ -1498,7 +1500,7 @@ excludeNoSearchPages = 1 } } - + # "Menu of subpages to these pages + sections - liststyle" 7 < .1 7 { @@ -1759,7 +1761,7 @@ DIV.csc-textpic DIV.csc-textpic-imagerow { clear: both; } DIV.csc-textpic DIV.csc-textpic-single-image IMG { margin-bottom: {$styles.content.imgtext.rowSpace}px; } - /* IE7 hack for margin between image rows */ + /* IE7 hack for margin between image rows */ *+html DIV.csc-textpic DIV.csc-textpic-imagerow .csc-textpic-image { margin-bottom: 0; } *+html DIV.csc-textpic DIV.csc-textpic-imagerow { margin-bottom: {$styles.content.imgtext.rowSpace}px; } @@ -1815,7 +1817,7 @@ * html .csc-textpic-intext-left ol, * html .csc-textpic-intext-left ul { height: 1%; } /* End hide from IE5/mac */ - + DIV.csc-textpic DIV.csc-textpic-imagerow-last { margin-bottom: 0; } /* Browser fixes: */ Index: typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php =================================================================== --- typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php (Revision 8768) +++ typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php (Arbeitskopie) @@ -325,6 +325,9 @@ if ($conf['labelStdWrap.']) { $conf['linkProc.']['labelStdWrap.'] = $conf['labelStdWrap.']; } + if ($conf['useSpacesInLinkText'] || $conf['stripFileExtensionFromLinkText']) { + $conf['linkProc.']['removePrependedNumbers'] = 0; + } // Traverse the files found: $filesData = array(); @@ -347,7 +350,18 @@ $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'] + ); } } @@ -874,6 +888,40 @@ ************************************/ /** + * 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