You are here

function og_subgroups_settings in Subgroups for Organic groups 5

Same name and namespace in other branches
  1. 5.4 og_subgroups.module \og_subgroups_settings()
  2. 5.3 og_subgroups.module \og_subgroups_settings()
  3. 6 includes/admin.inc \og_subgroups_settings()

Menu callback; displays the subgroups configuration page.

1 string reference to 'og_subgroups_settings'
og_subgroups_menu in ./og_subgroups.module
Implementation of hook_menu().

File

./og_subgroups.module, line 126
Maintains subgroups hierarchy created by the orgainc groups module.

Code

function og_subgroups_settings() {
  $form['propagte_content'] = array(
    '#type' => 'fieldset',
    '#title' => t('Group posts propagation'),
    '#description' => t('Content can be propagated through the subgroups tree.'),
    '#collapsible' => TRUE,
  );
  $form['propagte_content']['og_subgroups_propagate_content'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Content propagation'),
    '#description' => t('Set the propogation type for posts which are group posts.'),
    '#options' => array(
      'up' => t('Parents'),
      'down' => t('Children'),
      'side' => t('Syblings'),
    ),
    '#default_value' => variable_get('og_subgroups_propagate_content', array()),
  );
  $form['propagte_user'] = array(
    '#type' => 'fieldset',
    '#title' => t('User propagation'),
    '#description' => t('Group members and admins can be propagated through the subgroups tree.'),
    '#collapsible' => TRUE,
  );
  $form['propagte_user']['og_subgroups_propagate_members'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Members propagation'),
    '#description' => t('Set the propogation type for group members.'),
    '#options' => array(
      'up' => t('Parents'),
      'down' => t('Children'),
      'side' => t('Syblings'),
    ),
    '#default_value' => variable_get('og_subgroups_propagate_members', array()),
  );
  $form['propagte_user']['og_subgroups_propagate_demote'] = array(
    '#type' => 'checkboxes',
    '#title' => t('User demotion'),
    '#description' => t("Determine if a demotion action should occur along the subgroups. \n      Demotion referes to removing admin and to completely unsubscribing a member/ admin from a group.\n      These options will be executed only if the 'Members propagation' is set."),
    '#options' => array(
      'remove_admin' => t('Removing admin rights (user still remains a member)'),
      'unsubscribe' => t('Unsubscribing or denying membership of a user'),
    ),
    '#default_value' => variable_get('og_subgroups_propagate_demote', array()),
  );
  return system_settings_form($form);
}