최신글 썸네일 자동 출력문의

최신글 썸네일 자동 출력문의

QA

최신글 썸네일 자동 출력문의

본문

갤러리 최신글을 사용하고 있는데요

유투브를 올리면 메인화면 최신글에 자동으로 썸네일이 생성되게 하려면 어떻게해야하나요?

아래는 최신갤러리 소스입니다.

 

<?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>
 

이 질문에 댓글 쓰기 :

답변 1

http://sir.kr/pg_tip/15391 

 

유투브 썸네일 가져오는 팁입니다. 참고하시면 될거 같습니다.

답변을 작성하시기 전에 로그인 해주세요.
전체 56
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT