You are here

function template_preprocess_gallery_image_thumbnail in Node Gallery 6.2

File

theme/theme.inc, line 102
theme/theme.inc Node gallery theme functions

Code

function template_preprocess_gallery_image_thumbnail(&$vars) {
  $image = $vars['image'];
  $config = $vars['config'];
  $mode = $vars['mode'];
  switch ($mode) {
    case NODE_GALLERY_VIEW_TEASER:
      $url = "node/" . $image->gid;
      break;
    case NODE_GALLERY_VIEW_IMAGE_LIST:
      $url = "node/" . $image->nid;
      break;
  }
  $vars['image_output'] = l(theme('image_view', $config['image_size']['thumbnail'], $image), $url, array(
    'html' => TRUE,
  ));
  $vars['title_output'] = l($image->title, 'node/' . $image->nid);
}