| 1 |
<?php
|
| 2 |
// $Id: og_subgroups.admin.inc,v 1.6 2008/08/29 19:29:36 amitaibu Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Admin page callbacks for the subgroups for organic groups module.
|
| 7 |
*/
|
| 8 |
|
| 9 |
/**
|
| 10 |
* Builds and returns the subgroups settings form.
|
| 11 |
*/
|
| 12 |
function og_subgroups_admin_settings() {
|
| 13 |
$form['propagte_content'] = array(
|
| 14 |
'#type' => 'fieldset',
|
| 15 |
'#title' => t('Group posts propagation'),
|
| 16 |
'#description' => t('Content can be propagated through the subgroups tree.'),
|
| 17 |
'#collapsible' => TRUE,
|
| 18 |
);
|
| 19 |
$form['propagte_content']['og_subgroups_propagate_content'] = array(
|
| 20 |
'#type' => 'checkboxes',
|
| 21 |
'#title' => t('Content propagation'),
|
| 22 |
'#description' => t('Set the propagation type for posts which are group posts. Select in which direction the propagation should occur. For example if you select "Parents" content will propagate up the tree.'),
|
| 23 |
'#options' => array(
|
| 24 |
'up' => t('Parents'),
|
| 25 |
'down' => t('Children'),
|
| 26 |
'side' => t('Siblings'),
|
| 27 |
),
|
| 28 |
'#default_value' => variable_get('og_subgroups_propagate_content', array()),
|
| 29 |
);
|
| 30 |
$form['propagte_user'] = array(
|
| 31 |
'#type' => 'fieldset',
|
| 32 |
'#title' => t('Users propagation'),
|
| 33 |
'#description' => t('Group members and admins can be propagated through the subgroups tree.'),
|
| 34 |
'#collapsible' => TRUE,
|
| 35 |
);
|
| 36 |
// Member propagation.
|
| 37 |
$form['propagte_user']['og_subgroups_propagate_member'] = array(
|
| 38 |
'#type' => 'checkboxes',
|
| 39 |
'#title' => t('Propagation direction'),
|
| 40 |
'#description' => t('Set the propagation type for group members.'),
|
| 41 |
'#options' => array(
|
| 42 |
'up' => t('Parents'),
|
| 43 |
'down' => t('Children'),
|
| 44 |
'side' => t('Siblings'),
|
| 45 |
),
|
| 46 |
'#default_value' => variable_get('og_subgroups_propagate_member', array()),
|
| 47 |
);
|
| 48 |
// Propagation type.
|
| 49 |
$form['propagte_user']['og_subgroups_propagate_type'] = array(
|
| 50 |
'#type' => 'radios',
|
| 51 |
'#title' => t('Admins propagation'),
|
| 52 |
'#description' => t('Propagate admin rights. The propagation will be in the direction defined in "Propagation direction".'),
|
| 53 |
'#options' => array(
|
| 54 |
'no_admin_propagate' => t("Don't propagate admin rights, only membership"),
|
| 55 |
'admin_propagate' => t('Propagate admin rights and membership as well'),
|
| 56 |
'only_admin_propagate' => t("Propagate only admin rights, don't propagate membership"),
|
| 57 |
),
|
| 58 |
'#default_value' => variable_get('og_subgroups_propagate_type', 'admin_propagate'),
|
| 59 |
);
|
| 60 |
$form['propagte_user']['og_subgroups_propagate_demote'] = array(
|
| 61 |
'#type' => 'checkboxes',
|
| 62 |
'#title' => t('Rights demotion'),
|
| 63 |
'#description' => t("Determine if a demotion action should occur along the subgroups.
|
| 64 |
Demotion referes to removing admin and to completely unsubscribing a member/ admin from a group.
|
| 65 |
These options will be executed only if the 'Members propagation' is set."),
|
| 66 |
'#options' => array(
|
| 67 |
'remove_admin' => t('Propagate removal of admin rights (user still remains a member)'),
|
| 68 |
'unsubscribe' => t('Unsubscribe or deny membership of a member'),
|
| 69 |
|
| 70 |
),
|
| 71 |
'#default_value' => variable_get('og_subgroups_propagate_demote', array()),
|
| 72 |
);
|
| 73 |
|
| 74 |
return system_settings_form($form);
|
| 75 |
}
|