function homebox_og_group_settings_page in Homebox 6.3
Same name and namespace in other branches
- 6.2 homebox_og/homebox_og.module \homebox_og_group_settings_page()
- 7.2 homebox_og/homebox_og.module \homebox_og_group_settings_page()
OG Homebox settings form
1 string reference to 'homebox_og_group_settings_page'
- homebox_og_menu in homebox_og/
homebox_og.module
File
- homebox_og/
homebox_og.module, line 123 - Organic Groups integration for Homebox
Code
function homebox_og_group_settings_page() {
$form = array();
// Gather all available pages
$pages = homebox_pages();
// Build form options
$options = array();
foreach ($pages as $page) {
$options[$page->name] = check_plain($page->settings['title'] . ' (' . $page->name . ')');
}
$form['help'] = array(
'#type' => 'item',
'#value' => t('The permissions set in the chosen Homeboxes will be still be checked. Make sure that the users who are viewing OG components can also view the Homeboxes.'),
);
$form['home'] = array(
'#type' => 'fieldset',
'#title' => t('Homepage'),
);
$form['home']['homebox_og_home'] = array(
'#type' => 'select',
'#title' => t('Override group homepages'),
'#default_value' => variable_get('homebox_og_home', 0),
'#options' => array(
0 => '- None -',
) + $options,
'#description' => t('
If chosen, organic group home pages will be replaced by the specified Homebox.
It is recommended that the chosen Homebox does not have a menu entry because
user settings will persist, if available.
'),
);
$form['tab'] = array(
'#type' => 'fieldset',
'#title' => t('Menu Tab'),
);
$form['tab']['homebox_og_tab'] = array(
'#type' => 'select',
'#title' => t('Add a group tab'),
'#default_value' => variable_get('homebox_og_tab', 0),
'#options' => array(
0 => '- None -',
) + $options,
'#description' => t('Optionally add a Homebox as a tab to an organic group home page.'),
);
$form['tab']['homebox_og_tab_membersonly'] = array(
'#type' => 'checkbox',
'#title' => t('Group members only'),
'#description' => t('If checked, a user can only view this group tab if they are a member of the given group.'),
'#default_value' => variable_get('homebox_og_tab_membersonly', 0),
);
$form['#submit'][] = 'homebox_og_group_settings_page_submit';
return system_settings_form($form);
}