[TYPO3-dev] Copy files to fileadmin after installing an extension?
Richard Davies
richard at ocular.co.nz
Fri Nov 11 09:10:24 CET 2011
Hi,
To automatically insert records into the database, you create a file called
'ext_tables_static+adt.sql' and put insert queries into it line by line.
This creates a line in the extension manager for 'import static data for
{tablename}'. Heres a truncated example:
DROP TABLE IF EXISTS tx_dietitians_status;
CREATE TABLE tx_dietitians_status (
uid int(11) NOT NULL auto_increment,
...
...
PRIMARY KEY (uid),
KEY parent (pid)
);
INSERT INTO tx_dietitians_status VALUES (1....
INSERT INTO tx_dietitians_status VALUES (2...
As for the creating files/moving them, I've never done it myself, I guess
you could add a one off function to be called as a user function typoscript
in ext_typoscript_setup.txt. Typo3 documentation is pretty bleh, I found
this on the net which might help :
http://www.aforms2web.com/fileadmin/downloads/Extension_API.pdf
Richard
On 11 November 2011 14:00, Josef Florian Glatz <typo3 at josdesign.at> wrote:
> Hello list,
>
> I'm general new to developing tpyo3 extensions. I have made a few little
> things...
>
> Now I'm writing an extension to startup a new website in a view minutes.
>
> Is there a possibility to let the update script of an extension do
> something like
>
> creating files (or copy them from extensiondir to fileadmin)
> do some sql queries, to fill the database with some sample records.
>
>
> thx in forward!
> --
> Regards,
> Josef Florian Glatz
> http://typo3blog.at
> ______________________________**_________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-dev<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev>
>
More information about the TYPO3-dev
mailing list