[TYPO3-dev] Call php function when creating a record
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Fri Jan 18 15:40:06 CET 2008
Brian Bendtsen schrieb:
> Martin Kutschker skrev:
>> Brian Bendtsen schrieb:
>>> Hi
>>>
>>> I have made an extension that allows be users to create some records.
>>> I would like to call a special php function when one of these
>>> records are saved.
>>>
>>> Where do I have to look for something like that?
>>
>> Have a look at the hooks of TCEmain.
>>
>> Masi
> Hi again
>
> Thanks Masi, I found the hook I needed and its works ok.
>
> When a BE-user creates or updates a certain record type, a mail is sent
> to an number of website users.
>
> Is it possible to create a confirmation box that allows the be-user to
> click on "yes" if the email has to be sent and "no" is nothing should be
> done?
I guess you could do it if you XLASS the code that creates the icons. Maybe
you can add some JS code that sets a hidden form variable depending on your
JS confirmation box. Probably it's possible to access the POST in your
TCAmain hook.
To determine if you need such a confirmation box you have, I think, to
examine the GET vars of alt_doc.php which renders the TCEform stuff.
Masi
More information about the TYPO3-dev
mailing list