유튜브 썸네일 만들기
본문
<?php
for ($i=0; $i<count($list); $i++) {
if($list[$i]['is_notice']) $list[$i]['icon_pack'].="<span class='list-icon icon-notice'>Notice</span>";
if($list[$i]['icon_new']) $list[$i]['icon_pack'].= "<span class='list-icon icon-new'>New</span>";
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], false, true);
if($list[$i]['icon_secret']){
$img_content = '<div class="secret-box"></div>';
$list[$i]['icon_bg']=true;
}else{
if($thumb['src']){
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="gallery-img-content">';
} else if($list[$i]['wr_10']){
preg_match("/^(?:http(?:s)?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?v(?:i)?=|(?:embed|v|vi|user)\/))([^\?&\"'>]+)/", $list[$i]['wr_10'], $matches);
$img_content = '<img src="https://img.youtube.com/vi/'.$matches[1].'/maxresdefault.jpg" class="gallery-img-content">';
} else {
$img_content = '<div class="no-image"></div>';
}
}
$list[$i]['content_text']=$list[$i]['icon_secret'] ? "<span class='list-content-secret'>비밀글입니다.</span>" : cut_str(strip_tags($list[$i]['wr_content']), 120);
?>
댓글목록
등록된 댓글이 없습니다.