첨부파일 이미지와 유튜브 주소가 있을경우 첨부파일 이미지가 보이게 할려면

첨부파일 이미지와 유튜브 주소가 있을경우 첨부파일 이미지가 보이게 할려면

QA

첨부파일 이미지와 유튜브 주소가 있을경우 첨부파일 이미지가 보이게 할려면

본문

게시판 list 목록에서

첨부파일 이미지와 유튜브 주소가 있을 경우에

유튜브 이미지가 목록에서 나오고 있는데

첨부 이미지가 나오게 할려면 아래 소스를 어찌 수정해야 할까요?

 


    <div class="list_01">
        <?php if ($is_checkbox) { ?>
        <div scope="col">
            <input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
            <label for="chkall"><span class="sound_only">현재 페이지 게시물 </span>전체선택</label>
        </div>
        <?php } ?>
        <ul>
            <?php
            for ($i=0; $i<count($list); $i++) {
            ?>
            <div class="gall_li <?php if ($wr_id == $list[$i]['wr_id']) { ?>gall_now<?php } ?>">
                <?php if ($list[$i]['wr_10']) {  ?>
                    <!-- 유튜브 동영상 시작 { -->
                    <?php 
                    $youtube_link = $list[$i]['wr_10'];
                    $youtube_url = parse_url($youtube_link);
                    parse_str($youtube_url['query']);
                ?>
                <?php if($v){ ?>
                <div class="youtubeWrap">
                    <iframe width="728" height="450" src="//www.youtube.com/embed/<?php echo $v; ?>?feature=player_detailpage&vq=hd720" frameborder="0" allowfullscreen></iframe>
                </div>
                <?php } ?>
                <!-- } 유튜브 동영상 끝 -->
                <?php } else {  ?>
                <!-- 이미지 시작 { -->
                <a href="<?php echo $list[$i]['href'] ?>" class="gall_img">
                    <?php
                            $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_mobile_gallery_width'], $board['bo_mobile_gallery_height']);
                           if($thumb['src']) {
                              $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_mobile_gallery_width'].'" height="'.$board['bo_mobile_gallery_height'].'">';
                           } else {
                              $img_content = '';
                            }
                            echo $img_content;
                        }

                        {
                        $v_img_count = count($list[$i]['file']);
                            if($v_img_count && !$img_content) { 
                            if ($list[$i]['file'][0]['view']) {
                            echo strip_tags(get_view_thumbnail($list[$i]['file'][0]['view']), '<img>');
                            }
                        }
                    ?>
                </a>
                <!-- } 이미지 끝 -->
                <?php } ?>
            </div>

이 질문에 댓글 쓰기 :

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

회원로그인

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