Mambo Component Tutorial

Few days ago I was looking for a whois component to be used on this site but couldn’t find something that works and is simple enough. So I decided to write one myself. Then I was hit by another problem because Mambo doesn’t have clear documentation for component developers (yet) and only few sites provide tutorials. Therefore, I had to download others’ components and dig through the files to understand how it works. This article is an attempt to summarize what I’ve learned so far.

The aim of this article is not to write a working application but rather to explain the parts that build a component and how Mambo use these parts.

Throughout this article, I’ll use ‘mycomp‘ to represent the component name which should be replaced by your own component name, and ‘installdir‘ as Mambo base installation directory.

I’ll start by explaining the basic files required to build a component. These files are grouped according to where they are used/viewed:

  • Frontend files
    • mycomp.php
    • mycomp.html.php (optional)
  • Administration files
    • admin.mycomp.php
    • admin.mycomp.html.php (optional)
    • toolbar.mycomp.php
    • toolbar.mycomp.html.php (optional)
  • Class files
    • mycomp.class.php (optional)
  • Installation files
    • mycomp.xml
    • install.mycomp.php (optional)
    • uninstall.mycomp.php (optional)

Files marked ‘optional’ are not technically required by Mambo but having them makes it easier to manage your code later.

Pages: 1 2 3 4 5 6 7