고수님들의 답변을 부탁드립니다.

고수님들의 답변을 부탁드립니다.

QA

고수님들의 답변을 부탁드립니다.

본문

라이트박스로 동영상을 불러올려고합니다.

이미지는 잘나오구요.. 이미지 불러 오는 부분을 동영상으로 바꾸어 보았습니다.

 

사용스킨 :

 

원본 (변경된 부분은 표시하겠습니다.)

<?php
</script>
if(!$board['bo_table']) die('err99');
if(!$write['wr_id']) die('err98');

$sql = " select *
            from {$g5['board_file_table']}
            where bo_table = '$bo_table'
              and wr_id = '$wr_id'
              and bf_type in ( '1', '2', '3', '6' )
            order by bf_no ";

$result = sql_query($sql);

$imglist = '';
$link = G5_URL.'/bbs/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;

for($i=0; $row=sql_fetch_array($result); $i++) {
    if(!$row['bf_file'])
        continue;

    $file = G5_DATA_PATH.'/file/'.$bo_table.'/'.$row['bf_file'];
    if(!is_file($file))
        continue;

    $src = str_replace(G5_PATH, G5_URL, $file);

아래부분을 유투브로 바구고 싶은데 어찌 해야하는지 정멀 모르겠습니다.


 <원본>   $imglist .= '<li><a href="'.$link.'"><img src="'.$src.'" alt="'.($row['bf_content'] ? get_text($row['bf_content']) : get_text($row['bf_source'])).'"></a></li>';  

<변경>

$imglist .= '<li><a href="'.$link.'"><img src="'.$list[$i]['wr_1'].'/maxresdefault.jpg" alt="'.($row['bf_content'] ? get_text($row['bf_content']) : get_text($row['bf_source'])).'"></a></li>';

 

위 두부분을 보시면 아시겠지만 변경을 해보았는데 안됩니다. ㅠㅠ

고수님들의 도움을 요청드립니다. ㅠㅠ

 

}

if($imglist) {
 echo '<div class="more_wrap">';
 echo '<span class="close"></span>';
    echo '<ul class="more">'; 
    echo  $imglist;
    echo '</ul>';
 echo '<div>';
 echo '안녕하십니까?';
 echo '</div>';
 echo '</div>';

} else {
    die('err00');
}

?>
<script>
    $(function () {
            $('.more_wrap').css('top', $(window).scrollTop());
        $('.wrap').outerHeight($(document).outerHeight() - $('#hd').outerHeight());
        if ($('.more li').length > 1) {
            var arrow = "<span class='arrow prev'></span> <span class='arrow next'></span> "
            $('.more li').prepend(arrow);
        }
        $('.more').outerWidth($('.more li').length * 800 + 'px');

        var li_w = $('.more li').width();

        $(".arrow").click(function () {

            var v = $(this).parents('.more_wrap').index();

            var point = $(".more_wrap").find("ul");
            var ulValue = parseInt(point.css("margin-left"));
            var liW = point.children("li").width() + parseInt(point.children("li").css("margin-right"));
            var prevV = parseInt(ulValue) + liW;
            var nextV = parseInt(ulValue) - liW;
            // alert(nextV);

            if ($(this).hasClass("next")) {
                if (ulValue > -li_w && $(".more_wrap").eq(v).find("ul:animated").length < 1) {
                    point.animate({
                        "margin-left": nextV
                    });
                }
            } else {
                if (ulValue < 0 && $(".box").eq(v).find("ul:animated").length < 1) {
                    point.animate({
                        "margin-left": prevV
                    });
                }
            }
            return false;

            $(window).resize(function () {
                if ($(window).width() < 480) {
                    $('.more').outerWidth($('.more li').length * 320 + 'px');
                    if ($(this).hasClass("next")) {
                        if (ulValue > -li_w && $(".more_wrap").eq(v).find("ul:animated").length < 1) {
                            point.animate({
                                "margin-left": nextV
                            });
                        }
                    } else {
                        if (ulValue < 0 && $(".box").eq(v).find("ul:animated").length < 1) {
                            point.animate({
                                "margin-left": prevV
                            });
                        }
                    }
                }
            });
        });
        $('.close').click(function () {
            $('.wrap').css('display', 'none');
            $('.more_wrap').remove();
        });
    });
</script>​ 

이 질문에 댓글 쓰기 :

답변 1

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

회원로그인

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