[TYPO3-core] RFC: Feature Request #8487: Enable configuration of filesize labels for CType uploads

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Jul 14 11:18:05 CEST 2008


Oliver Hader wrote: on 05.06.2008 09:50:

> Oliver Hader schrieb:
>> Hi Ernesto,
>>
>> Ernesto Baschny [cron IT] schrieb:
>>> I am ok with that, but it "breaks compatibility". I would tend to 
>>> agree that the old default " | K| M| G" is not really good, but this 
>>> is how it was displayed until now and maybe some web-design "breaks" 
>>> if this string gets longer.
>>>
>>> Even better would be to pass $fileD['filesize'] through stdWrap, 
>>> something like:
>>>
>>>     $this->cObj->stdWrap($fileD['filesize'], $conf['filesize.']);
>>>
>>> and have a default in TypoScript:
>>>
>>>     filesize.bytes = 1
>>>     filesize.bytes.label = {$styles.content.uploads.filesize.labels}
>>>
>>> (note: bytes is a stdWrap function that calls t3lib_div::formatSize) 
>>> This should provides enough flexibility to format the sizes of the 
>>> files the way the user wants it.
>>>
>>> So I +1 on the change (either "new property" or my stdWrap 
>>> suggestion), but only if that part is included in TypoScript in a 
>>> compatVersion 4.3 section.
>>
>> I changed the labels back to the old default " | K| M| G". Thus, I 
>> think the compat version is not necessary anymore, is it? Furthermore 
>> I took your sdtWrap suggestion. New patch is attached...
> 
> Just saw that it doesn't make sense to have "wrap" and "wrap2" in the 
> patch, when the other markup stuff is not configurable. Will move it 
> back to the user function in final commit.

+1 too. Go ahead Oli.

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list