All Joomla extensions have XML manifest files (<extension_name>.xml). This file is located in the root directory of the installation package. It include general installation information and parameters for the extension.
The manifest file contains:
All XML files start with:
<?xml version="1.0" encoding="utf-8"?>
This starting and closing tags for all extensions are:
<extension type="plugin" group="content" method="upgrade">
The group attribute is required for plugins as there are several types of plugins. The upgrade method is important. If you do not include this, then every time you install an upgrade version of the extension, the uninstall script will run and it will delete your existing data.
The following elements can be used to insert metadata.
After adding root element and its attributes, add the metadata information. The version tag is important as each time you release a new version of your extension you should adjust this version number. You should use a three digit version number separated by full stops. The description tag is the text that the user will see when they install or upgrade the extension.
Specify the namespace to be used for autoloading the extension. The given namespace will autoload to the root directory of your extension by default however you can optionally add a "path" attribute to the namespace element to specify a path within your extensions root directory.
The next part of the manifest is to include all files and folders to copy to the front-end directory. It is placed in the <files> element.
You can use the folder tag to include all the files and subfolders within a folder. You can use the optional folder attribute to specify a directory in the ZIP package to copy from.
For plugins, the raw name of the plugin should be placed in the plugin attribute on the <filename> element that points to the file containing the plugin's class. For example,
Extensions should store the assets (JS, CSS, images) in the media folder.
<media folder="media" destination="com_example">
This is applicable to only components. This section includes menu links and back-end files.
The <config> element describes the configuration options for the extension (except component type, which do not support this). These options can also be defined in a separate file named config.xml.
Each fieldset must contain one or more <field> elements.
Components generally have one or more database tables to store data. When you install your component, you need to run some SQL command to create the table, so the <install> tag tells Joomla where this file is.
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
When someone uninstalls your component, you will need to run some clean up SQL commands that delete the tables used by your component and remove all traces. The <uninstall> SQL files allow you to do that.
The <update> tag allows you to provide a series of SQL files to update the current schema.
An optional script file can be defined using a <scriptfile> element.