It's actually exactly what I'm trying to do. But it doesn't work for me. An example is the tracker view I enabled (for now you can see it here):
http://scottt.aharonic.net/njsavings/video/tracker
There's only one thumbnail. When I click it, the thickbox loading bar just spins.

Two requests (these seemed to fit so I put them in the same issue):
1. Is there anything I can do to get the thumbnail-thickbox functionality working out of the box?
2. In the meantime, how do I print just the thumbnail image (with no link)?

Before this module I've been adding all this code to my node-video.tpl.php file to get something like this to work. Like this:

  <?php
    if (!empty($node->field_video_thumbnail[0]['filepath'])) {
      print '<a class="thickbox" href="#TB_inline?height=340&width=400&inlineId=video">';
      print '<img src="/njsavings/files/imagecache/videothumb/';
      print $node->field_video_thumbnail[0]['filepath'] . '" /></a>';
    }
  ?>
  
    <div id="video" style="display: none;">
<embed src="http://www.jeroenwijering.com/embed/mediaplayer.swf" width="395" height="310" allowfullscreen="true" allowscriptaccess="always" flashvars="&displayheight=310&file=<?php print $node->vidfile; ?>&height=310&image=&width=395" />
    </div>

(There was a module conflict, which is why I'm changing to the video module. So this way of printing the thumbnail above no longer works).

I would still do something like this, and circumvent the functionality that your module provides in the meantime (since I can't get that to work right now) -- But the main thing keeping me from doing that is, I can't see how to print the thumbnail on it's own. The closest I've got is <?php print $node->content['video_image_thumbnail']['#value']; ?>, but this still prints the thumbnail as a link with (broken) thickbox functionality, so i can't even do this. :(

Obviously I'd rather help get this working so I can just implement this out of the box :) -- But my second request is just for the meantime (so I can get this site running!) - how to print the thumbnail by itself (not as a link)?

Thanks in advance for your help!
:)
Scott

Comments

scottrigby’s picture

The other thing I tried doesn't work either - I tried to add a CCK Image field to the video node-type (not the 'custom fields', because these are only text fields and I need a thumbnail). But when click upload on the image field the page responds as if I'm uploading the entire video again (same uploading... icon), except it seems to stick. So apparently there's some conflict between the two.

It would be workable for me even if:
1. the custom fields allowed other cck modules
2. I could just add cck fields to the node-type in the regular way under /admin/content/types without a conflict
4. Someone could help me figure out what code I can add to my .tpl file to print the thumbnail image itself (with no link, etc)
3. Ideally of course the thumbnail feature provided by the video module would just work for me then I wouldn't have to do a thing except thank you immensely :) (I'll of course feel that way as long as I can get one of these workarounds to work in the meantime).

;)
Scott

fax8’s picture

Category: bug » support

this is not a bug,, right? You are just trying to modify video module default behavior.

Well.. if you want to modify how the thumbnail is displayed, without the link stuff, you shuold:
* override the theme_video_image_teaser function in your template.php.
* in the override function comment the code which adds the link in the last if statement and just attach the img tag

You should use something like this in your template.php file (not tested):

function phptemplate_video_image_teaser($node) {
  $image = NULL;
  if($node->type == 'image') {
    $image = image_display($node, 'thumbnail', array('class' => 'video_image_teaser'));
  }
  else if($node->serial_data['image_teaser']){ // only for backward compatibility
    $image = theme('image', $node->serial_data['image_teaser'], $node->title, $node->title, array('class' => 'video_image_teaser'), FALSE);
  }
  
  if($image) {
    //Create a link with an image in it.
    //$output .= l($image, "node/$node->nid", array(), NULL, NULL, FALSE, TRUE); 
    $output .= $image;
    $output .= '<br class="video_image_clear" />';
  }
  return $output;
}

Let me know if this works.

scottrigby’s picture

Category: support » bug

Well, I guess it depends if I'm understanding the intended functionality or not.

When I go to: http://scottt.aharonic.net/njsavings/video/tracker it's the default view that came with this module (I assumed?).
The thumbnail, when clicked, opens a thickbox (I assumed this was part of the module too? Though I realize I could be totally wrong about this! I just can't see where my system could be making this happen).

SO it's that thickbox functionality of the video thumbnail that I was reporting as a bug, because rather than opening the video in that thickbox, the loading bar just keeps spinning and no video appears.

The rest of my question (how I could print the thumbnail only) IS a support request (I just added them togehter because they fit together). My intention was also to let you know my intended goal, in case there was another way to do it... because in fact I had been doing the very same thing with other modules (which I can no longer use) and now I find this module seems to do it out of the box! -- if only I could get the thickbox feature to work

I will try this support-workaround now and let you know - thanks!

:)

scottrigby’s picture

Ok, This override clears the link, so that should help me add the thickbox manually

Unfortunately the only way I know how to do that is to print the video in a hidden div, and call it through an inline thickbox function linked to the thumbnail, like the code farther above (the first post in this issue).

So I'll try to get this going for now (thanks for responding to the support request!) - but hopefully I can get the thickbox thing to function as it's supposed to (but can you confirm that this is the intended functionality, or was it something particular to my site that tried to unsuccessfully call the video in a thickbox from clicking the thumbnail?)

fax8’s picture

Category: bug » support

Scott,

the video module does not provide any thickbox functionality out of the box. Then probably other modules are providing this feature.
You should have a look at your module list and investigate a bit.

The video module only provide a link which point to the node view and nothing more.

scottrigby’s picture

Category: support » bug

Ok, So this is purely a support request - thanks for clarifying that ;)

One thing I'm still having trouble with though, is printing the link to the video in the teaser view.
I'm trying this (which works in the full-node view, but seems not to in the teaser):

<?php print $node->vidfile; ?>

In the full node view, this example prints this: "http://scottt.aharonic.net/njsavings/files/videos/test2.flv"

Is there a way to do this in the teaser?

Thanks!
:))

scottrigby’s picture

(to clarify)
What I'm trying to do is modify the php template override you suggested above.
This is the code I tried below (but I just can't seem to get the video url to print -- if there was a way to print the video file itself I could even add the filepath manually - but don't see how to do that either?):

/*
 * Override thumbnail link in Video module. From: http://drupal.org/node/234767#comment-771211
 */
function phptemplate_video_image_teaser($node) {
  $image = NULL;
  if($node->type == 'image') {
    $image = image_display($node, 'thumbnail', array('class' => 'video_image_teaser'));
  }
  else if($node->serial_data['image_teaser']){ // only for backward compatibility
    $image = theme('image', $node->serial_data['image_teaser'], $node->title, $node->title, array('class' => 'video_image_teaser'), FALSE);
  }
 
  if($image) {
    //Create a link with an image in it.
    //$output .= l($image, "node/$node->nid", array(), NULL, NULL, FALSE, TRUE);
	$output .= '<a class="thickbox" href="#TB_inline?height=340&width=400&inlineId=video">';
    $output .= $image;
	$output .= '</a>';
	$output .= '<div id="video" style="display: none;"><embed src="http://www.jeroenwijering.com/embed/mediaplayer.swf" width="395" height="310" allowfullscreen="true" allowscriptaccess="always" flashvars="&displayheight=310&file=';
	$output .= $node->vidfile;
	$output .= '&height=310&image=&width=395" /></div>';
    $output .= '<br class="video_image_clear" />';
  }
  return $output;
}

??
:)

hypertext200’s picture

Version: 5.x-1.x-dev » master
Assigned: Unassigned » hypertext200
hypertext200’s picture

Status: Active » Closed (fixed)