JOOMLA! Module Building

Submitted by Anonymous (not verified) on Sun, 10/28/2012 - 00:55

Simple Joomla module building procedure for learn to module building

simple " Sample Module " Examples

Sample module to show favorite quote in website.

To build a module as simple as possible i.e most basic module requires only two files.  one is an XML configuration file and other is a PHP controller file. The XML configuration file in information file about this module i.e it contains about the information on autor, name, publisher date, version, parameters, setting, etc that will be displayed in the module manager. The php file is for the controlling logic i.e the code file for module mechanisam. purpse of the module or functional program is inserted here.

  

mod_sample_module.xml

<?xml version="1.0" encoding="utf-8"?>
<install type="module" version="2.5.7">
<!-- Module Name -->
<name>Sample Module</name>
<!-- Author Name-->
<author>BengalStudents</author>
<!-- Module Version Date-->
<creationDate>2012-10-27</creationDate>
<!-- Copyright information -->
<copyright>All rights reserved by BengalStudents 2012.</copyright>
<!-- License Information -->
<license>GPL 2.0</license>
<!-- Author's Email Address -->
<authorEmail>bengalstudents@gmail.com</authorEmail>
<!-- Author's website -->
<authorUrl>www.bengalstudents.com</authorUrl>
<!-- Module version -->
<version>1.0.0</version>
<!-- Module Description -->
<description>To Show Quote "You can do anything, but not everything"</description>
<!-- Listing of all files that should be installed for the module to function -->
<files>
<!-- The "module" attribute signifies that this is the main controller file -->
<filename module="mod_sample_module"> mod_sample_module.php </filename>
<filename>index.html</filename>
</files>
<!-- Optional parameters -->
<params/>
</install>

 

mod_sample_module.php

 

<?php
// this line is for security purpose. this don't allow other scripts to grab and execute our file
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
?>
<p>
    <blockquote>You can do anything, but not everything</blockquote>
</p>

 

 

index.html

 

<html><body bgcolor="#FFFFFF"></body></html>

 

 

 

 

Attchments

Related Items

Website Building with JOOMLA!: A Complete Guide for the Beginner

Joomla is a popular content management system (CMS) . Using joomla package one can easily build website within two-three hours. Website build with joomla is dynamic and updateable . Joomla is conneted with MySQL data base and the script of package is build with PHP.