Actions

J1.5

Components:xml installfile

From Joomla! Documentation

Revision as of 08:41, 1 February 2013 by Wilsonge (Talk | contribs)

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Delete-icon.png
This Page is a Candidate for Deletion

This page is a candidate for deletion. The given reason is: [This page isn't used in the Joomla template tutorial - People would be better looking at that here Developing a Model-View-Controller Component - Part 1.]

This notice should remain for a minimum of 1 week after it was placed on the page. If discussion is still ongoing, it should remain until a consensus is reached, after which the page will either be deleted or this notice removed. If you disagree with its deletion, please discuss your reasons on its associated talk page, as applicable.

Remember to check if anything links here and the page history before deleting.

Last edit by Wilsonge (talk · contrib) · Last edited on Fri, 01 Feb 2013 08:41:06 +0000
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install SYSTEM "http://www.joomla.org/xml/dtd/1.5/component-install.dtd">
<install type="component" version="1.5.0">
        <!--  The extension commercial name: make it different form others at JED http://extensions.joomla.org/-->
        <name>Hello World</name>
        <!-- The following elements are optional and free of formatting constraints --> 
        <!-- Original creation date. Recommended: YYYY-MM-DD -->
        <creationDate>2007-01-17</creationDate>
        <author>John Doe</author>
        <authorEmail>john.doe@example.org</authorEmail>
        <authorUrl>http://www.example.org</authorUrl>
        <copyright>Copyright Info</copyright>
        <license>License Info with link</license>
        <!--  The version string is recorded in the components table -->
        <version>1.0.1</version>
        <!--  The date for the actual version release -->
        <releaseDate>2010-05-14</releaseDate>
        <!--  Type of release: Bug fix, Security Fix, Minor update, Major update -->
        <releaseType>Major update</releaseType>
        <downloadUrl>http://www.example.org/downloads/myjoomlaextensions/</downloadUrl>
        <!-- The description is optional and defaults to the name -->
        <description>Description of the component ...</description>
 
        <!-- Custom Install Script to execute -->
        <!-- Note: This will be copied from the root of the installation package to the administrator directory automatically -->
        <installfile>install.helloworld.php</installfile>
 
        <!-- Custom Uninstall Script to execute -->
        <!-- Note: This will be copied from the root of the installation package to the administrator directory automatically -->
        <uninstallfile>uninstall.helloworld.php</uninstallfile>
 
        <!-- Install Database Section -->
        <install>
                <sql>
                        <file driver="mysql" charset="utf8">install.mysql.utf8.sql</file>
                        <file driver="mysql">install.mysql.nonutf8.sql</file>
                </sql>
        </install>
 
        <!-- Uninstall Database Section -->
        <uninstall>
                <sql>
                        <file driver="mysql" charset="utf8">uninstall.mysql.utf8.sql</file>
                        <file driver="mysql">uninstall.mysql.nonutf8.sql</file>
                </sql>
        </uninstall>
 
        <!-- Site Main File Copy Section -->
        <files>
                <filename>index.html</filename>
                <filename>helloworld.php</filename>
                <folder>views</folder>
        </files>
 
        <!-- Site Main Language File Copy Section -->
        <languages>
                <language tag="en-GB">en-GB.com_test.ini</language>
                <language tag="de-DE">de-DE.com_test.ini</language>
                <language tag="nl-NL">nl-NL.com_test.ini</language>
        </languages>
 
        <!-- Site Main Media File Copy Section -->
        <media destination="com_helloworld">
                <filename>image.png</filename>
                <filename>flash.swf</filename>
        </media>
 
        <administration>
 
                <!-- Administration Menu Section -->
                <!-- Name to display at the component menu. Should be the same as the extension commercial name -->
                <menu img="components/com_helloworld/images/helloworld_icon.png">Hello World</menu>
                <submenu>
                        <!-- Note that all & must be escaped to &amp; for the file to be valid XML and be parsed by the installer -->
                        <menu link="option=com_helloworld&amp;controller=config">Configuration</menu>
                        <!-- Instead of link you can specify individual link attributes -->
                        <menu img="icon" task="hello" controller="z" view="a" layout="b" sub="c">Hello Again!</menu>
                        <menu view="test" layout="foo">Testing Foo Layout</menu>
                </submenu>
 
                <!-- Administration Main File Copy Section -->
                <!-- Note the folder attribute: This attribute describes the folder
                        to copy FROM in the package to install therefore files copied
                        in this section are copied from /admin/ in the package -->
                <files folder="admin">
                        <filename>index.html</filename>
                        <filename>admin.helloworld.php</filename>
                </files>
 
                <!-- Administration Language File Copy Section -->
                <languages folder="admin">
                        <language tag="en-GB">en-GB.com_helloworld.ini</language>
                        <language tag="de-DE">de-DE.com_helloworld.ini</language>
                        <language tag="nl-NL">nl-NL.com_helloworld.ini</language>
                </languages>
 
                <!-- Administration Main Media File Copy Section -->
                <media folder="admin" destination="com_helloworld">
                        <filename>admin-image.png</filename>
                        <filename>admin-flash.swf</filename>
                </media>
        </administration>
</install>
Info non-talk.png
General Information

Put this xml file, also called manifest, in the root of your package (because the installer will take its path as the root path for all other files). Don't include itself under <files>...