Monday, January 11, 2010

Module Development In Joomla 1.5x

TUTORIAL FOR COMPONENT
This article will discuss about the basic of module development in Joomla! 1. we are going to create a module which will randomly display the comment from guestbook comonent.

Preparation

For the preparation, you can use this insert statement to register your new module to Joomla! database.

INSERT INTO `jos_modules` (`title`, `ordering`, `position`, `published`, `module`, `showtitle`) VALUES
('Comment', 19, 'left', 1, 'mod_comment', 1);


Write The Code

Developing module is simpler than developing component. For the start, you just need one file to store your PHP code. So, create a new folder called mod_comment under modules folder inside your Joomla! root folder.

Then, create a new file inside your new folder and name it mod_comment.php. With this file, we're going to display a random comment from guestbook including the sender name and the sending date.


Run It

Now, open your Joomla! web, you will got a randomize comment displayed on your module. You can refresh your page to see if it works. You can also manage its placement from the Joomla! administration page.

1 comment:

  1. CMS solutions give a fast and reliable way of accessing server side scripting language and is very helpful in installing scripts fast. Thanks for giving the good review on this topic. CMS Solutions. Fundoo templates is offering professional web design and CMS solutions like template customization, web designing, CMS solutions, eCommerce solutions, Search engine optimization and Internet marketing

    ReplyDelete