Thursday 30 August 2012

Building an Administration based Component for Joomla 2.5

Using the Hello World as a basis for a component, found at Joomla 2.5 Hello World Component Example [http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Adding_a_view_to_the_site_part]

There's a couple of things missing on this page and that's the examples for

admin/sql/updates/index.html and admin/sql/updates/mysql/index.html are missing. 

You can find the example code for that at http://tutsforu.com/using-database-in-components.html

which is to put

  DROP TABLE IF EXISTS `#__productmapper`;
    CREATE TABLE `#__productmapper` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `greeting` varchar(25) NOT NULL,
    PRIMARY KEY (`id`)
    );
    
    INSERT INTO `#__productmapper` (`greeting`) VALUES
    ('DB Hello World!'),
    ('DB Good bye World!');

in both files. 

The other thing that's missing is the zip files for the project.   Here's mine for the very basic starting point of the component.  Mine has been relabelled 'productmapper' 

Download Basic Joomla 2.5 component here

No comments: