The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
PostPosted: Tue May 18, 2010 12:34 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 17, 2010 2:32 pm
Posts: 14
Hi,

i'm trying to make a joomla 1.5 component, but there are some tables that i need to create when installing.

i saw that in joomla 1.0 i would just add in the components xml file, the query between some <queries></queries> tags.

thanks,
sebastian


Last edited by sebastian tm on Thu May 20, 2010 5:38 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Tue May 18, 2010 6:47 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Fri Sep 09, 2005 2:13 pm
Posts: 7962
Location: The Netherlands
You can add an install.sql file, this needs to be called by the installer.
This can be added to your XML file during install, it will check if there is a file named install.sql in your backend folder.

<install>
<sql>
<file charset="utf8" [drive]="mysql">install.sql</file>
</sql>
</install>

<uninstall>
<sql>
<file charset="utf8" [drive]="mysql">uninstall.sql</file>
</sql>
</uninstall>

_________________
Robert Dam - Joomla Forum Moderator
Dutch Boards | Joomla Coding Boards | English Support Boards


Top
 Profile  
 
PostPosted: Wed May 19, 2010 7:15 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 17, 2010 2:32 pm
Posts: 14
thanks for your help.

i keep getting an error:

*Error! Could not find a Joomla! XML setup file in the package.

I have attached my xml files.
I realy don't know what's wrong with it.

If i remove the SQL part, I receive:

* XML Parsing Error at 27:16. Error 76: Mismatched tag
* Component Install: The XML file did not contain an administration element.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Wed May 19, 2010 5:50 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 17, 2010 2:32 pm
Posts: 14
i've solved the errors, it seems that you get errors from the zip file.
i used to modify the archive with total commander and kept getting errors.

now every time i want to modify the files before the install i make a fresh new compressed folder with windows' send to ->compressed folder.

and it works.


Top
 Profile  
 
PostPosted: Wed May 19, 2010 5:53 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 17, 2010 2:32 pm
Posts: 14
dam-man wrote:
You can add an install.sql file, this needs to be called by the installer.
This can be added to your XML file during install, it will check if there is a file named install.sql in your backend folder.

<install>
<sql>
<file charset="utf8" [drive]="mysql">install.sql</file>
</sql>
</install>

<uninstall>
<sql>
<file charset="utf8" [drive]="mysql">uninstall.sql</file>
</sql>
</uninstall>

it still doesn't work -,-


Top
 Profile  
 
PostPosted: Wed May 19, 2010 8:09 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Fri Sep 09, 2005 2:13 pm
Posts: 7962
Location: The Netherlands
Are you have the install files in the zip files and are they uploaded to your server?
This is needed to make it work properly

_________________
Robert Dam - Joomla Forum Moderator
Dutch Boards | Joomla Coding Boards | English Support Boards


Top
 Profile  
 
PostPosted: Thu May 20, 2010 5:38 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 17, 2010 2:32 pm
Posts: 14
It works now. thank you very much.

i thought that the <install> tag should be only once, and the <uninstall> tag at the end.

after the description i added both and worked fine.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 



Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group