You are here

function video_cck_thickbox in Embedded Media Field 5

Page callback for video-cck/thickbox/%node.

1 string reference to 'video_cck_thickbox'
video_cck_menu in contrib/video_cck/video_cck.module
Implementation of hook_menu().

File

contrib/video_cck/video_cck.module, line 511

Code

function video_cck_thickbox($node, $width, $height, $field_name) {
  $field = array();
  $field['widget']['video_width'] = $width;
  $field['widget']['video_height'] = $height;
  $field['widget']['video_autoplay'] = 1;
  $field['field_name'] = $field_name;
  $items = $node->{$field_name};
  $item = $items[0];
  $type = $node->type;

  // Respect any field access permissions.
  if (module_exists('cck_field_perms') && ($types = variable_get('cfp_types', null))) {
    if ($types[$type]) {
      $disallowed_fields = unserialize(variable_get('cfp_values', null));
      if ($disallowed_fields && $disallowed_fields[$type][$field_name] != 0) {
        if (!user_access(_cfp_content_to_readable($type, $disallowed_field, 'view'))) {
          drupal_access_denied();
          return;
        }
      }
    }
  }
  print theme('video_cck_video_video', $field, $item, 'video_video', $node);
}