Hello all - What we're trying to accomplish is pretty straightforward, but we've had two senior developers stumped for 2 weeks. At this point we're thinking we've missed a stupid step somewhere. We would LOVE a step-by-step explanation (as others would given the amount of scattered discussion. OK, so the simple requirements.

=>We have a graphic, that we want user to click, and then have a pop-up window open that automatically plays a video we've uploaded to youtube.

Basically, we WANT this (see demo by clicking on thumbnail) : http://videobox-lb.sourceforge.net/

Instead of the thumbnail, we have our own graphic ("play video") we want to use.

Sounded easy enough for us, but we've been banged our head against a wall here. We have Lightbox2, embed media field, and Youtube modules installed and activated. the rest is a complete mess...

Please help. This functionality would be terrific.

Thanks!

Comments

juankvillegas’s picture

  print "<a href='http://www.youtube.com/embed/" . $youtube_video_id . "' rel='lightframe'><img src='/path/to/image.jpg' /></a>";

Where $youtube_video_id will be something like diTpeYoqAhc for http://www.youtube.com/watch?v=diTpeYoqAhc

Ramanonos’s picture

Thanks. You Rock!

Ramanonos’s picture

Code works great. thanks. How do I have the youtube video play automatically?

juankvillegas’s picture

Add ?autoplay=1 to the URL... so the final URL will be something like http://www.youtube.com/embed/jvAL2R8B_B0?autoplay=1

Ramanonos’s picture

So the php code worked great when I just created a standalone block. But what would the code look like in html? Basically, I have an existing image in a simple html page, that I'd like to have pop-up using the same lightbox behavior. I hacked around, but nothing seems to work.

juankvillegas’s picture

<a href='http://www.youtube.com/embed/diTpeYoqAhc' rel='lightframe'><img src='/path/to/image.jpg' /></a>