Make your own free website on Tripod.com

phpWebSite developer documentation :
Module Installer feature API

Content

  1. What does the Module Installer feature is
  2. How it works
  3. Understanding how to create compliant modules
  4. Final notes

top of page

What does the Module Installer feature is

Module Installer (hereinafter indicated as M.I.) is a feature introduced in phpWebSite 0.8.1-CVS which allows installation/removal of modules to be automated and controlled by the Admin Panel; it had been created by Philip McAllister and extended to its actual form by Alessandro Pisani and Jeremy Agee.


top of page

How it works

When called, the M.I. accomplish the following steps :

  1. scan of the mod/ sub-directory of the phpWebSite installation to find out currently installed modules (non-installable core modules such as mainpage,userpage,poll,blocks,... will be automatically excluded by the harvest)
  2. scan each of the modules found for proper install and uninstall capabilities
  3. generate the resulting list and display it onto the panel
During phase 2, the M.I. will look for : In cases (a) , (b) for the install capability and (a) for the uninstall capabilityno more testing is performed, except for those core modules which require them (i.e. the Calendar, for which M.I. contains a work-around to allow upgrade for users coming from a phpWebSite 0.7.x-to-0.8.x upgrade).
The resulting URL entry in the panel will be: <a href="./mod/modulesname/module_xxxxx.php">text</a>
where xxxxx can be "setup" or "install", as seen above.


In cases (c) for the install capability and (b) for the uninstall capability file /mod/modulename/index.php is searched for one of :
If found, the resulting entry in the panel will be: <a href="./mod.php?mod=$file&op=xxxxxxx">text</a>
where xxxxx can be "setup" or "install", as seen above.

Please note that is also possible to create an hybrid installation method having modulename_install.php and the index.php?op=install binding at the same time (currently this is used by Hub-It and Comments modules).


top of page

Understanding how to create compliant modules

When creating new modules, making them compliant to the M.I. could benefit both sites-admins and users. Below are the conventional rules to create M.I.-compliant modules.


top of page

Final notes

Dear Developer/Admin:
This is the first incarnation of the M.I.; we hope you'll find it useful and easy to deal with. If you notice a bug, or you want to suggest improvements and enhancements please contact us: your help is always welcome.


<signed>
The phpWebSite Development Team


Alessandro Pisani <alextxm@users.sourceforge.net>