function taxonomy_image_node_display_form in Taxonomy Image 5
Same name and namespace in other branches
- 6 contributed/taxonomy_image_node_display/taxonomy_image_node_display.module \taxonomy_image_node_display_form()
1 string reference to 'taxonomy_image_node_display_form'
- taxonomy_image_node_display_menu in contributed/
taxonomy_image_node_display/ taxonomy_image_node_display.module - Implementation of hook_menu.
File
- contributed/
taxonomy_image_node_display/ taxonomy_image_node_display.module, line 70 - Display taxonomy images in nodes where and when you want them.
Code
function taxonomy_image_node_display_form() {
drupal_add_css(drupal_get_path('module', 'taxonomy_image') . '/taxonomy_image.css');
$form = array();
$form['taxonomy_image_node_view'] = array(
'#type' => 'checkboxes',
'#title' => t('Display taxonomy images on tagged nodes'),
'#options' => array_map('check_plain', node_get_types('names')),
'#default_value' => variable_get('taxonomy_image_node_view', array()),
'#description' => t('Show images in the selected content types.'),
'#prefix' => '<div class="taxonomy_image_checkboxes">',
'#suffix' => '</div><div class="clear-block"></div>',
);
$form['taxonomy_image_node_view_teaser'] = array(
'#type' => 'checkbox',
'#title' => t('Show Taxonomy Image in node teaser view'),
'#default_value' => variable_get('taxonomy_image_node_view_teaser', TRUE),
);
// If we have the blocks module, then default to FALSE for page view.
$form['taxonomy_image_node_view_page'] = array(
'#type' => 'checkbox',
'#title' => t('Show Taxonomy Image in node page view'),
'#default_value' => variable_get('taxonomy_image_node_view_page', !module_exists('taxonomy_image_blocks')),
);
$form['taxonomy_image_node_view_link'] = array(
'#type' => 'checkbox',
'#title' => t('Link displayed Taxonomy Image to taxonomy/term/n page'),
'#default_value' => variable_get('taxonomy_image_node_view_link', TRUE),
'#prefix' => '<div class="clear-block"></div>',
);
$form['taxonomy_image_node_show_name'] = array(
'#type' => 'radios',
'#title' => t('Link style'),
'#options' => array(
0 => t('Image only'),
1 => t('Image and name'),
),
'#default_value' => variable_get('taxonomy_image_node_show_name', 1),
'#description' => t('For the selected content types, this determines how the taxonomy links will be displayed.'),
'#prefix' => '<div class="taxonomy_image_radios">',
'#suffix' => '</div>',
);
if (module_exists('imagecache')) {
$form['taxonomy_image_node_preset'] = array(
'#type' => 'radios',
'#title' => t('Imagecache Preset'),
'#options' => drupal_map_assoc(_taxonomy_image_presets()),
'#default_value' => variable_get('taxonomy_image_node_preset', 'ORIGINAL'),
'#prefix' => '<div class="taxonomy_image_radios">',
'#suffix' => '</div>',
);
}
$form['taxonomy_image_node_view_weight'] = array(
'#type' => 'weight',
'#title' => t('Display weight of taxonomy images'),
'#description' => t('Determines where the images will be displayed. Less than zero will place it before the content; greater than zero, after.'),
'#default_value' => variable_get('taxonomy_image_node_view_weight', -5),
'#prefix' => '<div class="clear-block"></div>',
);
return system_settings_form($form);
}