[TYPO3-dev] TCE in FE

Dan Osipov dosipov at phillyburbs.com
Mon Oct 5 15:28:02 CEST 2009


Thanks for a detailed answer! I was leaning towards the first solution, 
but didn't know about the others. I'll take a look to see which one 
would work best.

In my scenario, I am mostly concerned about the TCE hooks - there are 
lots of them, and I would like to keep them operational, even if the 
record is created from the FE.

Dan Osipov
Calkins Media
http://danosipov.com/blog/

Bernhard Kraft wrote:
> Dan Osipov schrieb:
>> I'm wondering if anyone ever looked at utilizing TCE in the front end? I
>> would like to have FE users create records, that would benefit from TCE
>> hooks.
> 
> Hello!
> 
> There are two approaches utilizing "tcemain" - and another one which is
> also quite common for TYPO3.
> 
> *1*
> Create an instance of the normal t3lib_tcemain class, and initialize a
> temporary BE-user class "t3lib_beuserauth". If you want to know how this
> is done, have a look at my (obsolete) extension kb_shop in method:
> pi1/class.tx_kbshop_pi1.php:loadTable (search for "tempBE_USER"). In
> method "loadTable" the faked BE_USER record gets initialized.
> 
> Search for other occurences of "BE_USER" to get a glimpse how it is used
> in interaction with "t3lib_TCEforms"
> 
> 
> *2*
> There is a class:
> typo3/sysext/cms/tslib/class.tslib_fetce.php (tslib_feTCE)
> 
> I did not use it until now - but this should be what you want ;)
> 
> 
> *3*
> Both previous methods, require you to write additional PHP code. The
> other solution would be to user "fe_userAdmin". This is an old
> library/script written by Kasper. But I use it since I work with TYPO3
> (2003) to create "fe_user", "tt_address" and any other kind of records
> created by users.
> 
> The documentation is here:
> http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.2.1/view/1/11/#id4592033
> 
> Have a look at the templates of the extensions "feuser_admin" or
> "direct_mail_subscription". Of course these are just examples of
> creating "fe_user" or "tt_address" records.
> 
> In your cause you would most probably change the TypoScript parameter
> "table" of the plugin to match the name of your table.
> 
> BTW: If you ever wondered what the "TCA['tablename']['feInterface']"
> value in TCA is for: It lists the fields which are allowed to get
> modified from within the FE.
> 
> 
> 
> Does that answer your question?
> 
> 
> greets,
> Bernhard




More information about the TYPO3-dev mailing list