Meine Frage:
Ich möchte mit der helloworld.xml eine externe Installationsdatei aufrufen...
Hallo,
ich bin dabei eine Komponente zu entwickeln.
Habe bereits Galileo-Buch und Komponentenerstellung unter Joomla durchgelesen und die Komponente "HelloWorld" funktioniert auch...
Auszug aus der helloworld.xml
...
<files>
<filename>hello_world.php</filename>
</files>
<install>
<queries>
<query>DROP TABLE IF EXISTS `jos_hello_world`;</query>
<query>CREATE TABLE `jos_hello_world` (
`id` INT NOT NULL AUTO_INCREMENT,
`text` TEXT NOT NULL,
`published` TINYINT(1) NOT NULL,
PRIMARY KEY (`id`)
)
</query>
</queries>
</install>
<uninstall>
<queries>
<query>DROP TABLE IF EXISTS `jos_hello_world`;</query>
</queries>
</uninstall>
<installfile>
<filename>install.hello_world.php</filename>
</installfile>
<uninstallfile>
<filename>uninstall.hello_world.php</filename>
</uninstallfile>
...
helloworld.install.php
<?php
function com_install() {
echo "Die Komponente wurde installiert...";
}
?>
Meine Überlegung war:
helloworld.xml
...
<files>
<filename>hello_world.php</filename>
</files>
<install>
<files>
<filename>/install/install.php</filename>
</files>
</install>
<uninstall>
<files>
<filename>/install/uninstall.php</filename>
</files>
</uninstall>
<installfile>
<filename>install.hello_world.php</filename>
</installfile>
<uninstallfile>
<filename>uninstall.hello_world.php</filename>
</uninstallfile>
...
bzw.
helloworld.install.php
<?php
function com_install()
include "../install/install.php"
{
echo "Die Komponente wurde installiert...";
}
?>
die externe installationsdatei enthält ein Formular mit Auswahl der Sprache usw...
Erst danach soll die Datenbank erstellt werden...
Ich komme dabei nicht weiter...
Bitte um Hilfe. Danke


LinkBack URL
About LinkBacks
Zitieren
Lesezeichen