function get_video($url, $width = 640, $height = 480) { if (strpos($url, 'youtube')) { get_youtube($url, $width, $height); } else { if (strpos($url, 'youtu.be')) { get_youtube($url, $width, $height, 'youtu.be'); } else { get_vimeo($url, $width, $height); } } }
function get_video($url, $width = 640, $height = 360) { if (empty($width) && empty($height)) { $width = 640; $height = 360; } if (strpos($url, 'youtube')) { get_youtube($url, $width, $height); } else { if (strpos($url, 'youtu.be')) { get_youtube($url, $width, $height, 'youtu.be'); } else { if (strpos($url, 'vimeo')) { get_vimeo($url, $width, $height); } } } }
function gdl_vimeo_shortcode($atts, $content = null) { extract(shortcode_atts(array("height" => '', "width" => ''), $atts)); $vimeo = '<div style="max-width:' . $width . 'px;" >'; $vimeo = $vimeo . get_vimeo($content, $width, $height, true); $vimeo = $vimeo . '</div>'; return $vimeo; }
echo $thumb_width; ?> px;height:45px">공지</strong> <?php } else { $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $thumb_width, $thumb_height); // 썸네일 크기를 위에서 선언한 크기사용 // 유튜브, 비메오 썸네일 추출 if (!$thumb) { // 썸네일이 없는 경우 if ($list[$i]['wr_1']) { // 유튜브 이미지 출력 $thumb['src'] = "http://img.youtube.com/vi/{$list[$i][wr_1]}/default.jpg"; } elseif ($list[$i]['wr_2']) { // 비메오 이미지 출력 $output = get_vimeo("http://vimeo.com/api/v2/video/" . $list[$i]['wr_2'] . ".php"); $output = unserialize($output); // echo "<img src='".$output[0][thumbnail_medium]."'>"; //thumbnail_small, thumbnail_medium, thumbnail_large $thumb['src'] = $output[0][thumbnail_medium]; } } // 유튜브, 비메오 썸네일 추출 end if ($thumb['src']) { $img_content = '<img src="' . $thumb['src'] . '" alt="' . $thumb['alt'] . '" width="' . $thumb_width . '" height="' . $thumb_height . '">'; } else { $img_content = '<span style="width:' . $thumb_width . 'px;height:' . $thumb_height . 'px">no image</span>'; } echo $img_content; } ?> </a>