유튜브 영상 숏츠 업로드 썸네일

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
유튜브 영상 숏츠 업로드 썸네일

QA

유튜브 영상 숏츠 업로드 썸네일

본문

안녕하세요

유튜브 영상 올리는 게시판을 쓰고 있는데

유튜브 영상은 썸네일이랑 클릭했을 때 페이지에서도 잘 보이는데

유튜브 숏츠를 올리면 썸네일에도 no-image라고 뜨고 페이지 안에서도 이미지가 안보입니다

 

어떤 코드를, 어떻게 추가해야하는지 알려주세요ㅠㅠ

write_update.skin.php에 작성하는 것 같아 코드를 가져왔는데

다른 파일이 필요하다면 말씀부탁드려요!



<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($wr_link1) {
    preg_match('@https?://(?:www\.)?youtube\.com/(?:watch\?|\?)?v[/=]([a-zA-Z0-9-_]+)@', $wr_link1, $matches);
    $wr_1 = $matches[1];
    if (!$wr_1) {
        preg_match('@https?://(?:www\.)?youtu\.be/([a-zA-Z0-9-_]+)@', $wr_link1, $matches);
        $wr_1 = $matches[1];
    }
    if ($wr_1) {
        sql_query(" update {$write_table} set wr_1 = '$wr_1' where wr_id = '$wr_id' ");
    }
}
else {
    sql_query(" update {$write_table} set wr_1 = '' where wr_id = '$wr_id' ");
}


list.skin.php부분입니다

<div class="gall_img" style="<?php if ($board['bo_gallery_height'] > 0) echo 'height:'.$board['bo_gallery_height'].'px;max-height:'.$board['bo_gallery_height'].'px'; ?>">
                        <a href="<?php echo $list[$i]['href'] ?>">
                          <?php
                          if ($list[$i]['is_notice']) { // 공지사항  ?>
                              <strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>
                          <?php } else {
                              // 썸네일. (유투브 코드로 썸네일처리)
                              $thumbsrc = '';
                              if ($list[$i]['wr_1']) {
                                  $thumbsrc = 'http://img.youtube.com/vi/'.$list[$i]['wr_1'].'/hqdefault.jpg';
                              }
                              if($thumbsrc) {
                                  $img_content = '<img src="'.$thumbsrc.'" alt="'.$list[$i]['subject'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
                              } else {
                                  $img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
                              }
                              echo $img_content;
                          }
                           ?>
                        </a>
                    </div>

 

숏츠 url입니다

https://www.youtube.com/shorts/

이 질문에 댓글 쓰기 :

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

회원로그인

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