갤러리형 최근글에서 유튜브등 동영상 썸네일을 표시하고 싶습니다.
본문
안녕하세요?
갤러리형 최근글에서 유튜브같은 동영상 썸네일을 표시하고 싶은데요
썸네일 뽑아내는 php문은 구했는데요
이걸 어떻게 적용해야 할까요?
도움 주시면 정말 감사하겠습니다.
갤러리형 최근글 이미지 뽑는 php문입니다.
<div class="img_set">
<a href="<?php echo $list[$i]['href'] ?>">
<?php
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $imgwidth, $imgheight);
if($thumb['src']) {
$img_content = '<img class="img_left" src="'.$thumb['src'].'" alt="'.$list[$i]['subject'].'" width="'.$imgwidth.'" height="'.$imgheight.'">';
}
else {
$img_content = 'No Image';
}
echo $img_content;
?>
</a>
</div>
유튜브 비메오 썸네일 뽑는 php 문입니다.
<?php if(strstr($list[$i]['wr_content'],'youtube.com/')):?>
<?php
preg_match('#(\.be/|/embed/|/v/|/watch\?v=)([A-Za-z0-9_-]{5,11})#', $list[$i]['wr_content'], $matches);
if(isset($matches[2]) && $matches[2] != ''){
$YoutubeCode = $matches[2];
}
$thumbNail = 'http://img.youtube.com/vi/'.$YoutubeCode.'/0.jpg';
$originalUrl = 'http://www.youtube.com/embed/'.$YoutubeCode.'?autoplay=1';
$originalClass = 'iframe';
?>
<?php elseif(strstr($list[$i]['wr_content'],'vimeo.com/')):?>
<?php
preg_match('#(player\.vimeo\.com\/video\/([0-9]{1,10}))#', $R['content'], $matches);
if(isset($matches[2]) && $matches[2] != ''){
$vimeoCode = $matches[2];
}
$hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/".$vimeoCode.".php"));
$thumbNail = $hash[0]['thumbnail_large'];
$originalUrl = 'http://vimeo.com/'.$vimeoCode;
$originalClass = 'vimeo';
?>
답변 1
이곳 검색란에
simple_mov 또는
simple_mov2 또는
simple_mov3 로 검색해 보시면
유튜브 최신글 자료가 있습니다.
그누보드4용이면 G5와 맞게 수정 하셔서 사용하시면 되겠군요.
저는 다음TV팟 동영상 섬네일 생성하는 방법을 질문 했는데 아직 답변을 받지 못하고 있는 상태네요. ㅠㅠ
링크를 참조 하세요.
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=149256#c_149391
http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=131747#c_131782
http://www.sir.co.kr/bbs/board.php?bo_table=g5_skin&wr_id=418#c_1779
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=121969#c_121986
좋은 결과 있으시길 바랍니다.
simple_mov 또는
simple_mov2 또는
simple_mov3 로 검색해 보시면
유튜브 최신글 자료가 있습니다.
그누보드4용이면 G5와 맞게 수정 하셔서 사용하시면 되겠군요.
저는 다음TV팟 동영상 섬네일 생성하는 방법을 질문 했는데 아직 답변을 받지 못하고 있는 상태네요. ㅠㅠ
링크를 참조 하세요.
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=149256#c_149391
http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=131747#c_131782
http://www.sir.co.kr/bbs/board.php?bo_table=g5_skin&wr_id=418#c_1779
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=121969#c_121986
좋은 결과 있으시길 바랍니다.
답변을 작성하시기 전에 로그인 해주세요.