You are here

function commons_anonymous_welcome_text_form in Drupal Commons 7.3

Configuration form to set welcome text for the anonymous site homepage.

1 string reference to 'commons_anonymous_welcome_text_form'
commons_install_tasks in ./commons.install
Implements hook_install_tasks().

File

./commons.install, line 183
Install, update and uninstall functions for the Commons install profile.

Code

function commons_anonymous_welcome_text_form() {
  $form['commons_anonymous_welcome_explanation'] = array(
    '#markup' => '<h2>' . st('Homepage welcome text') . '</h2>' . st("Below, enter text that will be shown on your community's homepage to help new visitors understand what your community is about and why they should join. The image below shows an example of how this text will appear. You can always change this text later."),
    '#weight' => -1,
  );
  $form['commons_anonymous_welcome_example'] = array(
    '#markup' => theme('image', array(
      'path' => 'profiles/commons/images/commons_homepage_text_example.png',
      'alt' => 'Home page example',
      'alt' => 'Home page example',
    )),
    '#weight' => 0,
  );
  $form['commons_anonymous_welcome_title'] = array(
    '#type' => 'textfield',
    '#title' => st('Welcome headline'),
    '#description' => st('A short description of the community that visitors can understand at a glance.'),
    '#required' => TRUE,
    '#default_value' => st('Welcome to our community'),
  );
  $form['commons_anonymous_welcome_body'] = array(
    '#type' => 'textarea',
    '#title' => st('Welcome body text'),
    '#description' => st('Enter a couple of sentences elaborating about your community.'),
    '#required' => TRUE,
    '#default_value' => st('Share your thoughts, find answers to your questions.'),
  );
  $form['commons_install_example_content'] = array(
    '#type' => 'checkbox',
    '#title' => st('Install example content'),
    '#description' => st('Install Commons with example content so that you can get a sense of what your site will look like once it becomes more active. Example content includes a group, a few users and content for that group. Example content can be modified or deleted like normal content.'),
    '#default_value' => TRUE,
  );
  $form['commons_enable_og_access'] = array(
    '#type' => 'checkbox',
    '#title' => st('Enable private group support'),
    '#description' => st('Add the ability to create private groups. Content in private groups can only be accessed by group members. <strong>Warning: Enable only if you require the ability to create private groups; this setting has performance implications.</strong>'),
    '#default_value' => FALSE,
  );
  $form['commons_anonymous_welcome_submit'] = array(
    '#type' => 'submit',
    '#value' => st('Save and continue'),
  );
  return $form;
}