You are here

function theme_video_cck_thickbox in Embedded Media Field 5

File

contrib/video_cck/video_cck.module, line 464

Code

function theme_video_cck_thickbox($field, $item, $formatter, $node, $options = array()) {
  $thumbnail = theme('video_cck_video_thumbnail', $field, $item, 'video_thumbnail', $node, true, $options);
  $width = isset($options['width']) ? $options['width'] : (isset($field['widget']['video_width']) ? $field['widget']['video_width'] : variable_get('video_cck_default_video_width', VIDEO_CCK_DEFAULT_VIDEO_WIDTH));
  $height = isset($options['height']) ? $options['height'] : (isset($field['widget']['video_height']) ? $field['widget']['video_height'] : variable_get('video_cck_default_video_height', VIDEO_CCK_DEFAULT_VIDEO_HEIGHT));
  $field_name = isset($options['field_name']) ? $options['field_name'] : $field['field_name'];
  $type_name = isset($options['type_name']) ? $options['type_name'] : $field['type_name'];
  $title = isset($options['title']) ? $options['title'] : $node->title;
  $destination = 'video-cck/thickbox/' . $node->nid . '/' . $width . '/' . $height . '/' . $field_name;
  $output = l($thumbnail, $destination, array(
    'title' => $title,
    'class' => 'thickbox',
    'rel' => $type_name,
  ), NULL, NULL, FALSE, TRUE);
  return $output;
}