I am designing out a module installation module. I would like to get some feedback and verify it's design will work with and support drupal modules. Sorry I haven't produced any images to go with this. It is fairly easy to understand.

If installing a module is simply uploading it to the modules directory and optionally running a sql statement then you understand the procedure of this module. Here is the blueprint.

******************************************
Installation Module Design
******************************************

Goal:
To allow admins to install or upgrade modules directly from within the administration panel. No ftp or mysql admin needed.

Reason:
Make it easy and convient to install modules. Make installation and maintence of modules conform to the rest of drupal administration (as in from the panel and independent of extra sometimes unavailable tools).

Overview:
With this module installed (or part of core) the administrator will be able to download modules from drupal that they would like to use on their own sites. To install the module they would navigate to the module > install module page. From there they can upload and install a new module without the use of specialized software.

******************************************
Use Case & Design:
******************************************
You the admin, want to add a new module to your site. You navigate to the Admin > Modules page.

Import Module - Page 1
- You click on the Install tab.
- On this page you are presented with a file field. You browse to the module and select it.
- You submit the form and upload the module.

Behind the scenes the import page checks for conflicts and will display a report to you on the next page.
It checks for these things,

1. Does the module or directory already exist?
2. Is the module you uploaded older than version you have installed?
3. Does the module you uploaded support the version of drupal you have installed?

Module Configuration - Page 2
You are now shown the module configuration page. This page shows you additional configuration options and reports. Here you see,
1. If the module or directory already exists
2. If the uploaded module version is older than the current version
3. The sql necessary for the modules databases
4. The path to the modules directory
5. The new path if it is not created

You are also given some options based on what it finds,
- Install and create directories (if module does not exist)
- Upgrade (if module does exist)
- Erase previous and install new (if module does exist)

These are described in detail in the new Module Designs.

Confirm and Report - Page 3
After you make your choices and submit your configuration options you are presented with the confirmation page. This page shows the options you have selected, the operations you have chosen to perform and the sql (if any) to execute.

Report - Page 4
When you are satisfied with your choices you submit the confirmation page and are presented with the installation completed message page. You are shown any error messages and any mysql messages.

******************************************
New Module Design
******************************************
A couple of new functions and variables would have to be added to modules to make the installation process more powerful. These would be:

Variables:
Supports Installation - If false or does not exist then the module deliberately cannot be installed this way
Directories Array - This is an array of directories to create
Installation SQL - SQL statement to execute for a new install
Upgrade SQL - SQL statement to execute for an upgrade
Erase SQL - SQL statement to erase any traces of this component
Module Version number - Number used to indicate the module version
Drupal Requirement - Version of drupal required
Requirement Text - Text to present to the admin about the requirements of this module
MaxPreviousUpgrade - Minimum version of previous module that can be upgraded

Functions:
Install_admin_Install - Function to call on install. Can be used to create the sql or perform other actions
Install_admin_Upgrade - Function to call on upgrade. Used for any specific actions to perform on upgrade
Install_admin_Erase - Function to call on erase and start new.

******************************************
Install Module Processes:
******************************************
Install and Create Directories
- When the user selects the Install and create directories option the code creates the directories specified in the Directories array and places the files in the array into those locations. If necessary it will request the addional files to be uploaded before continuing.
- After the directories are created and the files are put into their location the code checks for a sql install function. If one exists then it executes it.
- Next it checks if the installation sql variable exists. If so it executes it.
- At this point the page has completed all install operations and we display the results to the admin.

Upgrade
- When the user selects the upgrade option the code creates any directories specified in the Directories array and places the files in the array into those locations. If necessary it will request the addional files to be uploaded before continuing.
- After the directories are created and the files are put into their location the code checks for a sql upgrade function. If one exists then it executes it.
- Next it checks if the upgrade sql variable exists. If so it executes it.
- At this point the page has completed all upgrade operations and we display the results to the admin.

Erase and Start New
- When the user selects the erase and start new option the code checks for the module erase function.
- After if the sql erase statement variable exists it is executed.
- From here the install option procedure is called.

Comments

he is working on an install system, too. and he is almost done.

--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.

I talked to Adrian. Thanks.

Everyone interested in working on install should get together and move forward as a group.