function user_badges_block_configure in User Badges 7.3
Same name and namespace in other branches
- 6.2 user_badges.module \user_badges_block_configure()
- 6 user_badges.module \user_badges_block_configure()
- 7 user_badges.module \user_badges_block_configure()
- 7.2 user_badges.module \user_badges_block_configure()
Implements hook_block_configure().
File
- ./
user_badges.module, line 1437 - @brief User Badges module file
Code
function user_badges_block_configure($delta = 0) {
$form = array();
switch ($delta) {
case 'current_node':
$form['types'] = array(
'#type' => 'checkboxes',
'#title' => t('Show on these content types'),
'#default_value' => variable_get('user_badges_current_node_types', array()),
'#options' => node_type_get_names(),
'#attributes' => array(
'class' => array(
'container-inline',
),
),
);
break;
case 'my_badges':
$showone = (int) variable_get('user_badges_showone', 0);
$form['limit'] = array(
'#type' => 'radios',
'#title' => t('Apply admin limit on this block?'),
'#default_value' => variable_get('user_badges_my_badges_limit', 1),
'#options' => array(
t('No'),
t('Yes'),
),
'#attributes' => array(
'class' => array(
'container-inline',
),
),
'#description' => t('The current badge display limit is @limit.', array(
'@limit' => $showone == 0 ? t('unlimited') : $showone,
)),
);
break;
}
return $form;
}