You are here

function lightbox2_field_formatter_settings_summary in Lightbox2 7

Same name and namespace in other branches
  1. 8 lightbox2.module \lightbox2_field_formatter_settings_summary()
  2. 7.2 lightbox2.module \lightbox2_field_formatter_settings_summary()

Implements hook_field_formatter_settings_summary().

File

./lightbox2.module, line 881
Enables the use of lightbox2 which places images above your current page, not within. This frees you from the constraints of the layout, particularly column widths.

Code

function lightbox2_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $image_styles = lightbox2_image_styles();
  $fields = lightbox2_image_fields();
  $types = lightbox2_lightbox_types();
  $summary = '';
  if (isset($settings['caption']) && isset($settings['type']) && isset($settings['image_style']) && isset($settings['lightbox_style'])) {
    $summary .= '<strong>' . t('Caption field') . '</strong>: ' . $fields[$settings['caption']] . '<br/>';
    $summary .= '<strong>' . t('Display') . '</strong>: ';
    $summary .= $types[$settings['type']];
    $summary .= ': ';
    $summary .= $image_styles[$settings['image_style']];
    $summary .= ' => ';
    $summary .= $image_styles[$settings['lightbox_style']];
  }
  else {
    $summary = 'Title - Lightbox: original => original';
  }
  return $summary;
}