[Typo3-dev] How to create an UPDATE-Option in my plugin ?
Zach Davis
zach at castironcoding.com
Wed Mar 30 16:09:13 CEST 2005
Stefan Geith wrote:
> Ries van Twisk schrieb:
>
>> Stefan,
>> can you explain a little more about this???
>>
>>> could someone give me a hint, how I can create
>>> an update-option in the extensions-menu for my plugin ?
>>> Where do I register the function, that does the update ?
>
>
> When a new Version of my Plugin uses some db-field in
> another way than before, then I must have an Update-Function,
> when updating to the new Version - like in tt_news, where
> the category-filed was changed.
>
> I have seen, that I must create a class-file named
> "class.ext_update.php", but I can't find information
> about the contents of this file an how it is
> integrated in typo3.
>
> -
>
> Stefan
Make class.ext_update.php and put two functions in it. Call one "access"
-- this is called by typo3, I think, and it checks if the script
can/should be run. If access returns true, typo3 calls another function
called "main", which then does whatever you want it to do. This is how
I did it in the chc_forum extension -- might be helpful to look at the
update script in there.
best,
Zach
More information about the TYPO3-dev
mailing list