function advanced_forum_forum_most_active_poster_content_type_edit_form in Advanced Forum 7.2
Same name and namespace in other branches
- 6.2 plugins/content_types/forum_most_active_poster.inc \advanced_forum_forum_most_active_poster_content_type_edit_form()
Returns an edit form for the custom type.
File
- plugins/
content_types/ forum_most_active_poster.inc, line 180 - Most active poster.
Code
function advanced_forum_forum_most_active_poster_content_type_edit_form($form, &$form_state) {
// Make sure conf contains newer defaults. CTools should do this for us.
$conf = $form_state['conf'];
$conf += $form_state['plugin']['defaults'];
$form['period'] = array(
'#type' => 'select',
'#title' => t('Period'),
'#options' => array(
'day' => t('In the last day'),
'week' => t('In the last week'),
'month' => t('In the last month'),
'quarter' => t('In the last quarter'),
'year' => t('In the last year'),
'ever' => t('Ever'),
),
'#description' => t('Select what period you want to search for the most active poster.'),
'#default_value' => $conf['period'],
);
$roles = array(
'0' => t('Allow all roles'),
) + user_roles(TRUE);
unset($roles[DRUPAL_AUTHENTICATED_RID]);
$form['exclude'] = array(
'#type' => 'select',
'#title' => t('Exclude role'),
'#options' => $roles,
'#description' => t('Choose a role that will be excluded from being an active poster.'),
'#default_value' => $conf['exclude'],
);
$form['uidone'] = array(
'#type' => 'checkbox',
'#title' => t('Exclude UID 1'),
'#description' => t('If checked the super user will not be a possible most active poster.'),
'#default_value' => $conf['uidone'],
);
return $form;
}