Posts Tagged ‘Joomla’

Making of a Joomla! 1.5 Module

Sunday, August 3rd, 2008

Setting up a Sandbox

First we’ll create a basic installer to setup our sandbox. For this we are going to create a XML manifest file & a PHP file. Those who have a less knowledge about XML (don’t take it anyway ;)) can go to www.w3schools.com.

  1. mod_helloworld.xml
  2. mod_helloworld.php

Create a XML called mod_helloworld.xml and paste the below code in it.

<?xml version="1.0" encoding="utf-8"?>
<install type="module" version="1.5.0">
     <name>Hello World</name>
     <author>Your Name Goes Here</author>
     <creationDate>Date</creationDate>
     <copyright>(C) 2XXX-2XXX Company.com - All rights reserved.</copyright>
     <license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
     <authorEmail>name@domain.com</authorEmail>
     <authorUrl>www.domain.com</authorUrl>
     <version>1.0.0</version>
     <description>
          A Hello World Module for Joomla
     </description>
     <files>
          <filename module="mod_helloworld">mod_helloworld.php</filename>
     </files>
</install>

This XML file contains some basic information & it is very easy to understand. So, I’ll not discuss it.

After that, Create a blank PHP file called mod_helloworld.php.

Now, create a new archive and add above mentioned two files in it. The archive must be a .gz, .tar, .tar.gz, or .zip format. Then install the archive using Joomla! Module installer and you’ll get a blank module for development.

Making it Mature
Now we’ve a blank module in /modules/mod_helloworld/ directory for further development.

I’ll Continue….