Sunday, April 30, 2006

Modules vs. Components in Joomla! III

Joomla! Modules are written differently from components. They use different function calls and variables, so they need different example programs.

For example, take login and user registration. If a user can't login, then she registers first. We login to a module on the left, right, or top. We register in a component in the center.

Compare the login code with the registration code. The login code is in one file: mod_login.php. The registration code is in the directory: com_registration. There are two registration program files:

1. registration.html.php : displays data
2. registration.php : makes decisions about what to display (does logic).

Both files get data from the database. Right now I'm going to stick with figuring out modules, even though my goal is to modify user registration. My user registration customization will require the user to supply an 8-digit subscriber id checked against a table of ids added to Joomla.

0 Comments:

Post a Comment

<< Home