<?xml version="1.0" encoding="utf-8"?>
<install type="module" version="1.5.0">
<name>My Module</name>
<author>Go Fish Client Catchers</author>
<creationDate>2010-04-20</creationDate>
<copyright>All rights reserved by Go Fish Client Catchers.</copyright>
<license>GPL 2.0</license>
<authorEmail> This e-mail address is being protected from spambots. You need JavaScript enabled to view it </authorEmail>
<authorUrl>www.gofishcc.com</authorUrl>
<version>1.0.0</version>
<description>A basic module to display a simple phrase</description>
<files>
<filename module="mod_mymodule">mod_mymodule.php</filename>
<filename>index.html</filename>
</files>
<params />
</install>
The XML file and the PHP file should have the same name (distinguished by their file extensions). In this case I will save the XML file as mod_mymodule.xml. Notice that in the XML file there is a reference to the PHP file entitled mod_mymodule.php. The PHP file contains the functional code defining the purpose of the actual module. Below is an example of the PHP file for the module:
<?php
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
echo ‘This is my first module’;
?>
In this case, the module will simply display the phrase “This is my first module”.
A third file, index.html, is not necessary but is good practice as it ensures that a default page is displayed incase of a direct access attempt to the directory. The HTML file will look like this:
<html><body bgcolor="#FFFFFF"></body></html>
To package the module for installation and distribution, simply zip all the files, and name your zip file mod_mymodule.zip.


