I am trying to create a custom installation profile for small internal usage and I'd like to hide certain steps and also implement new functions as a quick-and-dirty way to pre-populate some default content (nodes, blocks, menus) and configuration settings (wysiwyg) by inserting them into the database during the profile installation.
I am using the standard profile as a guide to work from as well as following this guide, but having trouble getting this to work smoothly and since it's all pre-installation I can't use devel to troubleshoot (it's not enabled yet).
Let's call the custom installation profile customprofile
and the files I have are:
- customprofile_profile.info
- customprofile_profile.profile
- customprofile_profile.install
I've figured out (for example) how to override the "Select locale" step and hard-code that to be English in customprofile_profile.profile
:
function customprofile_install_tasks_alter(&$tasks, $install_state) {
$tasks['install_select_locale']['display'] = FALSE;
$tasks['install_select_locale']['function'] = 'customprofile_select_locale';
}
function customprofile_select_locale (&$install_state) {
$install_state['parameters']['locale'] = 'en';
}
...but I haven't been able to track down the syntax for:
1) inserting a new step at the end of the profile install
2) inserting some SQL (I found this old post but it seems to be for Drupal 6 and both the profile syntax and SQL insertion are incompatible with Drupal 7)
Any guidance for next steps on either/both of these would be appreciated!