function drupal_commons_features_form in Drupal Commons 6.2
Provide a form to choose which features to enable
1 string reference to 'drupal_commons_features_form'
- drupal_commons_profile_tasks in ./
drupal_commons.profile - Perform any final installation tasks for this profile.
File
- includes/
form.inc, line 11 - Contains form-related functions for the installation profile
Code
function drupal_commons_features_form(&$form_state, $url) {
$form = array();
drupal_set_title(st('Choose from available features'));
// Help message
$form['message'] = array(
'#type' => 'item',
'#value' => st('The selected features will be enabled after the installation has completed. At any time, you can turn the available features on or off.'),
);
// Required features
$form['required'] = array(
'#type' => 'fieldset',
'#title' => st('Required'),
'#description' => t('These features are required for Commons to operate.'),
);
$form['required']['feature-commons_core'] = array(
'#type' => 'checkbox',
'#title' => st('Core'),
'#default_value' => 1,
'#disabled' => 1,
'#required' => TRUE,
'#value' => 1,
'#description' => st('Provides the essential components for Commons'),
);
$form['required']['feature-commons_home'] = array(
'#type' => 'checkbox',
'#title' => st('Home page'),
'#default_value' => 1,
'#disabled' => 1,
'#required' => TRUE,
'#value' => 1,
'#description' => st('Provides a community-driven home page.'),
);
$form['required']['feature-commons_status_streams'] = array(
'#type' => 'checkbox',
'#title' => st('Activity streams'),
'#default_value' => 1,
'#description' => st('Add status updates and activity streams to users and groups.'),
'#required' => TRUE,
'#disabled' => 1,
'#value' => 1,
);
// Content-related features
$form['content'] = array(
'#type' => 'fieldset',
'#title' => st('Content'),
'#description' => t('Select which content types you wish Commons to make available to members of Commons groups. Note: If you de-select any of these, you can always enable them again after installation.'),
);
$form['content']['feature-commons_blog'] = array(
'#type' => 'checkbox',
'#title' => st('Blogs'),
'#default_value' => 1,
'#description' => t('Used by individuals to create personal blog posts within a group.'),
);
$form['content']['feature-commons_discussion'] = array(
'#type' => 'checkbox',
'#title' => st('Discussions'),
'#default_value' => 1,
'#description' => st('Used to create threaded topical discussions within a group.'),
);
$form['content']['feature-commons_answers'] = array(
'#type' => 'checkbox',
'#title' => st('Answers'),
'#default_value' => 1,
'#description' => t('Allows users to submit questions and answers, and vote for the best answer.'),
);
$form['content']['feature-commons_document'] = array(
'#type' => 'checkbox',
'#title' => st('Documents'),
'#default_value' => 1,
'#description' => st('Used as a container for attaching documents, images, and other digital files useful to a group.'),
);
$form['content']['feature-commons_wiki'] = array(
'#type' => 'checkbox',
'#title' => st('Wikis'),
'#default_value' => 1,
'#description' => st('A type of page that is editable by all members in a group (vs. editable only its original author).'),
);
$form['content']['feature-commons_poll'] = array(
'#type' => 'checkbox',
'#title' => st('Polls'),
'#default_value' => 1,
'#description' => st('Used to create polls within a group.'),
);
$form['content']['feature-commons_event'] = array(
'#type' => 'checkbox',
'#title' => st('Events & calendars'),
'#default_value' => 1,
'#description' => st('Used to create an event calendar for a group.'),
);
// Misc features
$form['misc'] = array(
'#type' => 'fieldset',
'#title' => st('Other functions'),
'#description' => st('Select which functions you wish to provide in Commons. Again, if you de-select any of these, you can enable them again after installation.'),
);
$form['misc']['feature-commons_profile'] = array(
'#type' => 'checkbox',
'#title' => st('Social profiles'),
'#default_value' => 1,
'#description' => st('Extend Drupal\'s simple profiles to include a variety of additional profile fields useful for community sites, plus various important user listings. (Strongly recommended.)'),
);
$form['misc']['feature-commons_subgroups'] = array(
'#type' => 'checkbox',
'#title' => st('Subgroups'),
'#default_value' => 1,
'#description' => st('Enables groups to be arranged into a hierarchy, optionally propagating content & members up and down the hierarchy.'),
);
$form['misc']['feature-commons_notifications'] = array(
'#type' => 'checkbox',
'#title' => st('Notifications'),
'#default_value' => 1,
'#description' => st('Allow users to subscribe to email & site-based notifications of site activity & new content.'),
);
$form['misc']['feature-commons_reputation'] = array(
'#type' => 'checkbox',
'#title' => st('User awards'),
'#default_value' => 1,
'#description' => st('Award users points and badges for performing community-related actions.'),
);
$form['misc']['feature-commons_invite'] = array(
'#type' => 'checkbox',
'#title' => st('Community invitations'),
'#default_value' => 1,
'#description' => st('Enable users to send invitations to join the site to external people.'),
);
$form['misc']['feature-commons_group_aggregator'] = array(
'#type' => 'checkbox',
'#title' => st('Content aggregator'),
'#default_value' => 1,
'#description' => st('Provides a way for group administrators to pull RSS content into a group from other sources.'),
);
$form['misc']['feature-commons_admin'] = array(
'#type' => 'checkbox',
'#title' => t('Admin assist'),
'#default_value' => 1,
'#description' => st('Bundles a variety of administrative interface tools in one place. (Bundled as a single feature so administrators who wish to use alternate admin interface tools can turn off the defaults easily.).'),
);
$form['misc']['feature-commons_seo'] = array(
'#type' => 'checkbox',
'#title' => st('SEO'),
'#default_value' => 1,
'#description' => st('Bundles all SEO-oriented capabilities in a module separate from Commons Core (for ease of administration).'),
);
// Acquia features
$form['acquia'] = array(
'#type' => 'fieldset',
'#title' => st('Acquia'),
'#description' => st('The !an can supplement the functionality of Commons by providing enhanced site search (faceted search, content recommendations, content biasing, multi-site search, and others using the Apache Solr service), spam protection (using the Mollom service), and more. A free 30-day trial is available.', array(
'!an' => l(t('Acquia Network'), 'http://acquia.com/products-services/acquia-network', array(
'attributes' => array(
'target' => '_blank',
),
)),
)),
);
$form['acquia']['feature-acquia_network_subscription'] = array(
'#type' => 'checkbox',
'#title' => st('Acquia Network'),
'#default_value' => 1,
'#description' => st('Leave this enabled to use the Acquia Network with your existing subscription or with a free 30 day trial.'),
);
// Redirect URL to remain inside the installation after submission
$form['url'] = array(
'#type' => 'value',
'#value' => $url,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => st('Continue'),
);
return $form;
}