Simple way to develop a Joomla Module

Modules are the powerful way to add new functionality in a Joomla site. If you know how to write a Joomla module, you can convert any PHP code into Joomla Module for example a Jquery slideshow, facebook fanbox etc. Is it possible? Yes Ofcource it is! Modules are used to display data in all or few pages(you can choose menus from module settings).

Nothing is more easier than writing a Joomla Module. So what you are waiting for? Just go through the steps below and write your own module 🙂

Step 1. Create a new XML file and write these lines in the file( you can use any text editor but dreamweaver is recommended ).



this is testing module
Ankur Sharma
16/08/2010
Wamptech
ankursharma@wamptech.com
www.ankursharma.net
1.0
module description here---- 

mod_test.php






Step 2. Write the module name in between <name>…</name>

and similarly change author, creation date, copyright, author email,author url, version and description.

Step 3. In between the <filename></filename> write a php file name and create a new php file with the same name.

Step 4. Use the following code for its functional part:-

get('test_opt1','default value');  // get the parameters of the module
echo "the value of option 1 is:- ";
echo $opt1;

//Here you can print anything you want to print in the module 

?>

Here we are done.
Now, Zip both the files in one and install it by using the Joomla installer.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Privacy Policy · Contact · Sitemap

© 7Tech – Programming and Tech Tutorials