[TYPO3-core] RFC: fix bug #1801 (no real read-only TCA field)

Martin Kutschker Martin.Kutschker at blackbox.net
Thu Jan 26 16:54:08 CET 2006


=?utf-8?q?Ren=C3=A9_Fritz?= <rene at typo3.org> writes on 
Mon, 23 Jan 2006 15:39:09 +0100 (MET):

>
> Update, see below
>
> > This is a CVS patch request.
>
> > Problem: TCA doesn't support read-only fields out-of-the-box except
> > plain text fields. If you need custom types, even simple ones, you
> > must use a custom fucntion with type "user".
> >
> > Solution: Enhance type "none" with a set of useful types and
> > formatting options.


The attached patch now uses attributes for greater flexibililty when adding new features like requested compatibility with select/group fields.

If "format" is set then the value will be formatted. The options are:

format = date
format.option = <date() format string, default d-m-Y>
format.strftime = 0 [if set, use strtime() instead of date()]
format.appendAge = 0 [if set, append age]

shortcuts (compatibilty with "eval" of type "input":
format = time <same as "date" with "option" is H:i>
format = datetime <same as "date" with "option" is H:i d-m-Y>
format = timesec <same as "date" with "option" is H:i:s>
format = timesec <same as "date" with "option" is Y>

format = int
format.base = <dec | hex | oct | bin | HEX, default is dec>

format = float
format.precision = <default is 2>

format = number
format.option = <sprintf() option without leading %>

format = md5

format = filesize
format.appendByteSize = 0 <if set, unformatted size is appended>

format = user
format.userFunc = <user function>

Masi 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-diff
Size: 4605 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060126/62d70c29/attachment.bin 


More information about the TYPO3-team-core mailing list