[TYPO3-dev] Best practice to implement BE-preprocessing in a FE plugin
Dmitry Dulepov
dmitry at typo3.org
Thu Jul 5 12:08:26 CEST 2007
Hi!
Taras Sajuk wrote:
> 2007/7/4, Dmitry Dulepov <dmitry at typo3.org>:
>> I see. Now it is clear.
>
> But I'm in the dark now ;-)
>
> The user who is uploading the file isn't a visitor but a fully
> authenticated BE-user - he is an editor using the site administrative
> surface (BE) to enter/upload the file. In fact the file is generally
> found somewhere under his filemount - no upload needed.
Oh, weel. Earlier you wrote: "Im working on a FE (content) Plugin. The
user should be able to enter data in the plugin form", so I assumed that
form is uploaded in FE!
> So I don't see why there should be a need to spawn a CLI-based
> BE-process as the guy is already working with the BE surface in his
> browser.
Absolutely right.
> I just need some code of my extension to be called just after the
> editor clicks on the save button of the content element (which is my
> plugin) while he is in the Typo3 admin surface (BE) .
>
> any ideas in this direction?
Sure. What you need is to use one of hook inside TCEmain. TCEmain is
where all BE data is processed. There is a function named
process_datamap(). It includes several hook. Extension can use them to
pre-, post- or reprocess the data. So when your hook is called, you just
postprocess xml file and fill your tables.
--
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
More information about the TYPO3-dev
mailing list