Plugin for Vimeo

JuSi / 2011-01-02 11:11:36   

Hi there, my first post on the forum.

This is a plugin to embed vimeo videos on your indexhibit page.

Download here

Just use it like this:

  1. <plug:vimeo id='99999999'/>

where id is the ID of your vimeo video

other parameters are:

width = 398 (default value)
height = 234 (default value)
portrait = 1 or 0
byline = 1 or 0
color = 2c97b8 (default value)

JuSi / 2011-01-02 11:13:55   

Also included vimeo_mosaic which shows a mosaic of your album videos

  1. <plug:vimeo_mosaic id='99999999'/>

where id is the ID of your vimeo album

other parameters are:

count = 9 (default)
thumbnail_width = 160 (default)
show_titles = yes | no

Enjoy!

mhtcka / 2011-01-12 10:28:43   

Hey Jusi, thanx for sharing...

the vimeo plugin works fine, but i don't see how vimeo_mosaic works.
do you have an example of the mosaic thing?

thx!

maaanu / 2011-01-14 12:50:58   

Hi,
I was interested in using your plugin, but I needed the thumbnail of the video.
So I modified your script.
Here is my modification :

  1. <?php if defined'SITE' exit'No direct script access allowed'

/**
* Vimeo
*
* Plugin
*
* @version 1.1
* @author Juan Sierra
* @modified by Maaanu with the help of http://www.soapboxdave.com/2010/04/getting-the-vimeo-thumbnail/
*
*/

function getVimeoInfo ($id) {

if (!function_exists('curl_init')) die('CURL is not installed!');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://vimeo.com/api/v2/video/$id.php");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
$output = unserialize(curl_exec($ch));
$output = $output[0];
curl_close($ch);
return $output;
}

function vimeo ($id) {
        $VideoInfo = getVimeoInfo($id);
        $thumb = $VideoInfo['thumbnail_medium'];
        $tags = $VideoInfo ['tags'];
        $longdesc = $VideoInfo ['description'];
        $titre = $VideoInfo ['title'];

return "";

}
?>

I'm not a developer, so I think it can be done in a better way, but that fits my needs :)

Thanks.

maaanu / 2011-01-14 12:53:38   
  1. Mmmh, it seems the code has been messed up...
  2. So, at the end, there's 
  3. return "< a href="http://vimeo.com/$id" title="$titre">< img src="$thumb" alt="$titre" /></a>";
  4. I've inserted spaces befor the a and before the img, so the code is displayed...
  5. Sorry...
tlb / 2011-01-29 10:06:14   

hi,

could any of you post a link to your websites so i could see how this works

thanks

adeyzaguirre / 2011-02-01 05:43:27   

Please, post a link to your websites

Thanks a lot

mattwad / 2011-03-15 22:49:04   

Is there a way to let this video thumbnails play in Thickbox or something?

monardo / 2011-04-06 13:01:44   

Hi maaanu, there seems to be a syntax error at the end of the code... after "return" (I am not talking about the spaces bero a and img).
Did you manage to have it working?
Thanks!

This thread has been closed, thank you.