[TYPO3-dev] Fields in the TCA that does not exist in the DB

Franz Koch typo.removeformessage at fx-graefix.de
Thu Oct 18 14:53:02 CEST 2007


Hi Mads, Hi devs,

> Is it somehow possible to have fields in the TCA that does not exist in 
> the database?
> 
> I'm in the midst of implementing a taxonomy extension which creates MM 
> relations from an arbitrary table to a central category table (see tread 
> on the ECT list). I want this to be as plug'n play as possible. An 
> administrator should not need to create MM select-fields on all the 
> tables that she wants to use with this extension.
> 
> Therefore I'm creating the field dynamically using a hook in the 
> t3lib_tceform class. This works to a certain degree - unfortunately the 
> tcemain checks the existing value of the field (found no hook in tcemain 
> to circumvent that) which causes a nasty SQL-select error to occur 
> whenever I save the BE-form.
> 
> Isn't this a missing feature of the tcemain?

based on the taxonomy extension and a rating extensions I coded which 
also can be 'attached' to any other db-table (or extension) without 
altering any existing table (although it's currently only possible for 
the FE in my case) I came to the following thoughts:

How about a new feature for TYPO3, with special support for such 
extensions. I call it a new feature, because I was thinking of something 
more - let me explain it.


Let's take some features with common use like:
- tagging, categorization
- ratings
- commenting-system
- polls
- save content as XML / PDF
- whatever may come

I think most of you will confirm, that these features are of general use 
and that it therefor might be cool if they can be simply switched on or 
off for any TYPO3 record - may it be a page, a news entry, a forums 
post, a regular content or some custom extension nobody knows of.

In the regular way of TYPO3, you would have to alter the TCA of every 
table you like to provide with the feature (like Mads is trying it) - 
may it be categories, comments, ratings or whatever. It's not a bad 
thing, but there might show up several 'sub-extensions' for numerous 
extensions, enabling just one additional feature which is not that nice. 
The second 'problem' is, how to disable one of these features for a 
certain record? Those options then would have to be provided by the 
extension itself, probably every author provides a different way to 
control that and thus it will not be very nice in terms of usability.

So I was thinking of a new feature for TYPO3, providing a API and 
management system for those extensions. With API I mean either something 
like a special service those extensions can register in, or some special 
    extension manager calls for registering the extension. Then TYPO3 
knows about the extension and can provide some features, like:
- showing a list of possible 'additional features' that can be enabled 
for the current record
- providing common configuration settings, like enabling, disabling and 
alignment (insert before or after the record)
- maybe by clicking on one of the 'special features' in the list, a 
small configuration panel expands (f.e. flexform driven)

I could also think of a small BE module in which the features can be 
enabled or disabled for selected db-tables. So it would be easy to 
manage those features.

These where just some quick thoughts, but I think that those 
possibilities will enrich TYPO3 a lot.

--
Greetings,
Franz




More information about the TYPO3-dev mailing list