최신글 썸네일 자동 출력문의
본문
갤러리 최신글을 사용하고 있는데요
유투브를 올리면 메인화면 최신글에 자동으로 썸네일이 생성되게 하려면 어떻게해야하나요?
아래는 최신갤러리 소스입니다.
<?php
if (!defined('_GNUBOARD_')) exit; //개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
global $is_admin;
$n_thumb_width = 174; //썸네일 가로 크기
$n_thumb_height = 106; //썸네일 세로 크기
?>
<link rel="stylesheet" href="<?php echo $latest_skin_url; ?>/style.css">
<section class="n_gallery_wrap">
<?php if (count($list) == 0) { //게시물이 없을 경우 ?>
<div class="n_no_list">게시물이 없습니다.</div>
<?php } else { //게시물이 있을 경우 ?>
<ul class="n_thumb">
<?php for ($i = 0; $i < count($list); $i++) { ?>
<li>
<a href="<?php echo $list[$i]['href']; ?>">
<?php
$n_thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $n_thumb_width, $n_thumb_height);
$n_noimg = "$latest_skin_url/img/noimg.gif";
if($n_thumb['src']) {
$img_content = '<img src="'.$n_thumb['src'].'" width="'.$n_thumb_width.'" height="'.$n_thumb_height.'" alt="'.$list[$i]['subject'].'" title="" />';
} else {
$img_content = '<img src="'.$n_noimg.'" width="'.$n_thumb_width.'" height="'.$n_thumb_height.'" alt="이미지없음" title="" />';
}
echo $img_content;
?>
</a>
</li>
<?php } ?>
</ul>
<?php } ?>
</section>