You are here

function taxonomy_image_image_attach_form in Taxonomy Image 5

Same name and namespace in other branches
  1. 6 contributed/taxonomy_image_attach/taxonomy_image_attach.module \taxonomy_image_image_attach_form()
1 string reference to 'taxonomy_image_image_attach_form'
taxonomy_image_attach_menu in contributed/taxonomy_image_attach/taxonomy_image_attach.module
Implementation of hook_menu.

File

contributed/taxonomy_image_attach/taxonomy_image_attach.module, line 42
Add functionality to terms similar to the image_attach.module. Allow a term editor to choose from EXISTING images rather than upload new ones all the time. Currently this uses image.module handling of image nodes to index available images.

Code

function taxonomy_image_image_attach_form() {
  drupal_add_css(drupal_get_path('module', 'taxonomy_image') . '/taxonomy_image.css');
  $form = array();
  $form['taxonomy_image_attach_enable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Allow selection of existing image node images to use as taxonomy_images'),
    '#default_value' => variable_get('taxonomy_image_attach_enable', TRUE),
  );
  $form['taxonomy_image_attach_enable_size'] = array(
    '#type' => 'checkbox',
    '#title' => t('Allow selection of image derivative sizes'),
    '#default_value' => variable_get('taxonomy_image_attach_enable_size', FALSE),
  );
  $form['taxonomy_image_attach_default_size'] = array(
    '#type' => 'radios',
    '#title' => t('Default image attach size'),
    '#options' => drupal_map_assoc(_taxonomy_image_presets()),
    '#default_value' => variable_get('taxonomy_image_attach_default_size', 'thumbnail'),
    '#prefix' => '<div class="taxonomy_image_radios">',
    '#suffix' => '</div><div class="clear-block"></div>',
  );
  return system_settings_form($form);
}