Forum topic: Block - Current Video

I've been playing around with blocks lately and discovered a neat way to provide a block of the current video node you're visiting. This makes it so that when you visit a node with an attached video, it'll display the video in the node.

1) Create a new view called "CurrentVideo" or something
2) Set it as a block
3) Set the type to Bonus Grid View or List
4) 1 node per block
5) You'll have one field - the video field (OpenPackage Video: Video) with the Inner Player option (or preview)
6) Set the arguments to just "Node: ID" with the default of "Use Empty Text"
7) In the arguments PHP handling code, use:

if ((arg(0) == 'node') && is_numeric(arg(1))) {
  $args[0] = arg(1);
  return $args;
}

8) For the Filters, select the node type that has the videos
9) Save and add the block to your theme.
10) In the display fields tab when editing the Content Type, hide the video field.
11) Visit a node with a video field, and you'll see the video popping up in the block instead of in the node itself.
12) Yay!

I'm trying to make video blocks... and I wonder if I'm doing something wrong, though I have installed Drupal/Views/CCK/OpenPackage Video two times now....

I don't see the video field (OpenPackage Video: Video)

This is the list of 'open package video' fields I see when I go make a View:
http://drupal.org/files/issues/op-video-field.png

Anyway around this? Could you export your view above? Then I could try importing.

I'm trying to make a video block that has no formatting around it, no title and no comment line.

This has me wondering as well; how would I create a view which lists the thumbnails of the 5 most recently submitted videos, for example?

My list of "OpenPackage Video" options in my views fields list does not have thumbnail nor video in it, so I'm confused.... mine is the same as kidsown's PNG above.

Jeff

Same here.

http://drupal.org/node/177822

This is now in 5.x-3.x-dev which I am about to upload to drupal.org

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h1> <h2> <h3> <h4> <b>
  • Lines and paragraphs break automatically.
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options