This is a small fix to support http://drupal.org/node/76319

The issue is that if an admin sets "Play in node" to "yes," and also has video images enabled, users will see a page with both the image and the video.

This patch addes a small check in theme_video_image_body for

  if(variable_get('video_playinbody', 0) == 0){

If there's a better place to put this, that's great, but this quick and dirty solution seems to be working so far.

Obviously if node/76319 gets changed this may be impacted.

CommentFileSizeAuthor
video_image_check.patch1.55 KBseanbfuller

Comments

seanbfuller’s picture

Status: Active » Needs review
fusion94’s picture

This can also be accomplished by commenting out line 153 (or so) in the video_image.module

  case 'view':
        if ($node->iid) {
          if($teaser) {
            $node->content['video_image_thumbnail'] = array('#value' => theme('video_image_teaser', $node));
          }
          else {
            //$node->content['video_image_thumbnail'] = array('#value' => theme('video_image_body', $node));
          }
        }
        break;
      case 'delete':
        node_delete(array('nid' => $node->iid));
        break;
    }
  }
}

What this allows for is no video thumbnailing/preview on the main video node page but still allows for video thumbnailing using Views to build a video tracker.

It works for me on 5.0 and haven't tested on anything lower.

fax8’s picture

Status: Needs review » Fixed

Committed to HEAD. Thanks.

Fabio

Anonymous’s picture

Status: Fixed » Closed (fixed)