Components:xml installfile

From Joomla! ドキュメンテーション

Revision as of 02:00, 22 December 2015 by Sync (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install SYSTEM "">
<install type="component" version="1.5.0">
	<!--  The extension commercial name: make it different form others at JED>
	<name>Hello World</name>
	<!-- The following elements are optional and free of formatting constraints --> 
	<!-- Original creation date. Recommended: YYYY-MM-DD -->
	<author>John Doe</author>
	<copyright>Copyright Info</copyright>
	<license>License Info with link</license>
	<!--  The version string is recorded in the components table -->
	<!--  The date for the actual version release -->
	<!--  Type of release: Bug fix, Security Fix, Minor update, Major update -->
	<releaseType>Major update</releaseType>
	<!-- 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 -->
	<!-- Custom Uninstall Script to execute -->
	<!-- Note: This will be copied from the root of the installation package to the administrator directory automatically -->
	<!-- Install Database Section -->
			<file driver="mysql" charset="utf8">install.mysql.utf8.sql</file>
			<file driver="mysql">install.mysql.nonutf8.sql</file>
	<!-- Uninstall Database Section -->
			<file driver="mysql" charset="utf8">uninstall.mysql.utf8.sql</file>
			<file driver="mysql">uninstall.mysql.nonutf8.sql</file>
	<!-- Site Main File Copy Section -->
	<!-- Site Main Language File Copy Section -->
		<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>
	<!-- Site Main Media File Copy Section -->
	<media destination="com_helloworld">
		<!-- 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>
			<!-- 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>
		<!-- 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">
		<!-- 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>
		<!-- Administration Main Media File Copy Section -->
		<media folder="admin" destination="com_helloworld">
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>...