테스트 사이트 - 개발 중인 베타 버전입니다

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

다조아해 6년 전 조회 3,320

게시판 list 목록에서

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

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

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

 

</strong></p>

<p>    <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']);</p>

<p>                           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 = '';

                            }</p>

<p>                            echo $img_content;

                        }</p>

<p>

                        {

                        $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></p>

<p><strong>

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
티로그
6년 전

</p>

<p><code><?php </code><code>if</code> <code>(false && </code><code>$list</code><code>[</code><code>$i</code><code>][</code><code>'wr_10'</code><code>]) {  ?></code></p>

<p><code>

하면 될것 같습니다만.

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

다조아해
6년 전
답변 주셔서 감사합니다.
잘 해결했습니다.

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인