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

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Jun 2 13:23:09 CEST 2008


Oliver Hader wrote: on 31.05.2008 15:35:
> This is a SVN patch request.
> 
> Problem:
> The filesize labels of the content type 'uploads' are not configurable.
> 
> Solution:
> Integrate new TypoScript constant and configuration to define these 
> labels which are set to " Bytes| KB| MB| GB" by default.
> 
> Comments:
> Thanks to Tom Rüther for writing the patch.
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=8487
> 
> Branch: Trunk

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.

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list