최신글 이미지사이즈 적용하는방법 도와주세요

최신글 이미지사이즈 적용하는방법 도와주세요

QA

최신글 이미지사이즈 적용하는방법 도와주세요

본문

최신글 이미지사이즈요 100% 출력하려고 찾다보니 이렇게 적용하라는

글을 보았는데요 스크립트를 아예 몰라서 아래 스크립트에 'bo_gallery_width'대신 $a, $b를

어떻게 적용시켜주어야 하나요?


<?php 
$board['bo_gallery_width'] = 1200;
$board['bo_gallery_height'] = 500;

 


$a = "<script>document.write(screen.width)</script>";

$b = "<script>document.write(screen.height)</script>";


$arr_option = array($a,$b);

?>​



.

.

.


       var jssor_slider1 = new $JssorSlider$("slider1_container", options);

        //responsive code begin
        //you can remove responsive code if you don't want the slider scales while window resizes
        function ScaleSlider() {
            var bodyWidth = document.body.clientWidth;
            if (bodyWidth)
                jssor_slider1.$ScaleWidth(Math.min(bodyWidth, <?php echo $board['bo_gallery_width']?>));
            else
                window.setTimeout(ScaleSlider, 30);
        }
        ScaleSlider();

        $(window).bind("load", ScaleSlider);
        $(window).bind("resize", ScaleSlider);
        $(window).bind("orientationchange", ScaleSlider);
        //responsive code end
    });

.

.

.

.




그리고 이곳엔 어떻게 바꿔주어야 하나요?


   <div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: <?php echo $board['bo_gallery_width']?>px;height: <?php echo $board['bo_gallery_height']?>px; overflow: hidden;">
    <?php for ($i=0; $i<count($list); $i++) { ?>
        <div>
            <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 {
                $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);

                if($thumb['src']) {
                    $img_content = '<img u="image" src="'.$thumb['src'].'" alt="'.$thumb['alt'].'">';
                } 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>
    <?php } ?>
    </div>







 


이 질문에 댓글 쓰기 :

답변 1

의뢰마당에 글을 남기시면 편합니다.

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

회원로그인

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