How to Create a Drupal Installation Profile with Profiler and Profiler Builder
Profiler provides a cleaner and easier way to create install profiles. Profiler Builder is an extension of the Profiler installation profile simplifier. This module creates a downloadable tar package that gives you a well made installation profile and associated drush make file based on the site its installed on. This is a fast, simple way of creating a distribution with options that take into account either local host development or drupal.org packaging scripts.
Additional Resources
Training
Training is a Drupal distribution for building Drupal based training websites / portal which brings together information about diverse courses (Drupal, PHP, Soft Skills, Personality Development etc.) in a unified way.
Training distribution contains most of the modules and basic configuration (content-types, views, features) you would need to create a training portal.
The core features of Training include :
- Inbuilt Roles - Trainer, Trainee.
- Inbuilt Vocabulary – Courses.
- Inbuilt Content Types - Course Topic, Course SubTopic, Course Assignments, Training, Training-Calender.
- Inbuilt Block – Courses taxonomy-view.
- Inbuilt Views - Calendar, Courses Listing, Topic-SubTopic Listing.
- Each course has a dedicated page, listing topic - sub topics with links having detailed description.
- The most interesting feature of this distribution is that Trainer can upload multiple videos, pdfs, documents under Course Topic and Course Sub-topic which Trainees can watch / read whenever they want.
- Trainers can schedule the trainings on various courses / topics / sub-topics with the help of Training-Calender content-type.
- Customizable home page with calendar view displaying all the scheduled trainings.
installing Distributions on Quickstart
Instructions for installing distributions / installation profiles on your Quickstart machine.
Using Commerce Kickstart as an example
cd /home/quickstartwget http://ftp.drupal.org/files/projects/commerce_kickstart-7.x-1.4-no-core.tar.gztar -zxvf commerce_kickstart-7.x-1.4-no-core.tar.gzdrush qc --domain=dcqs.dev --profile=commerce_kickstart --makefile=~/commerce_kickstart/distro.make
extra info:
- use the no-core files
- urls of latest releases can be found under the 'View all releases' link at the bottom of every distributions project page.
How to define a default installation language
Before proceding to the language selection form, the drupal install.core.inc execute this code
<?php
$function = $profilename . '_profile_details';
if (function_exists($function)) {
$details = $function();
if (isset($details['language'])) {
foreach ($locales as $locale) {
if ($details['language'] == $locale->name) {
$install_state['parameters']['locale'] = $locale->name;
return;
}
}
}
}
?> It searches for a function named PROFILENAME_profile_details() and if it is found, it searches for a variable 'language' to set it as installation language, without asking for it.
This is an example funtion to set Spanish as default language with an installation profile called 'spanish'.
<?php
function spanish_profile_details(){
$details['language'] = "es";
return $details;
}
?>This function should be located in the PROFILENAME.profile file.
Built-in Installation Profiles (Drupal 7)
The Standard profile has several core modules enabled. It has more default configuration set up, including several default admin tools. This profile does more to show what core can do, and can save site building time by having defaults for common use cases.
The Minimal profile has only a few very basic modules installed. This profile is useful if you only want very specific features, or if it will take more work to undo the defaults provided with the Standard profile.
Details
This table shows what extra modules will get enabled with the Standard profile:
Read moreHow to Write a Drupal 7 Installation Profile
Based on this article.
Installation profiles are like modules
All installation profiles must have profilename.info and profilename.profile files, and they can also have a profilename.install file. The profilename.profile file has access to almost everything a normal Drupal modulename.module file does because Drupal is fully bootstrapped before almost anything in the profile runs. The main exception is that st() should generally be used to translate strings instead of the usual t() because the localization hasn't been set up until the installation process completes.
.info file
The profilename.info file should look similar to this:
Read more