Warning: Undefined array key "mobile_dir" in /home/kagla/new-sir/old/common.php on line 315
list 갤러리에서 lightbox 적용 image 불러오기 문제

list 갤러리에서 lightbox 적용 image 불러오기 문제

list 갤러리에서 lightbox 적용 image 불러오기 문제

QA

list 갤러리에서 lightbox 적용 image 불러오기 문제

답변 4

본문

말 그대로 list_skin.php 에서 write.skin에서 편집해 올린 image를 lightbox에서 창띄어 자기 자신  

 

image출력할려고 하는데 image를 못 찾네요  

 

<?=$list[$i]['href']?> 이부분이 문제 인것 같은데 뭘 써야 image를 불러오는지 모르겠네요  

 

고수님들 조언 부탁 드립니다.

 

아래 코드 상태임  

 

<ul class="list-unstyled thumbnail" style="padding:10px; margin-bottom:5px;">
                                           
                                            <!-- gallery picture -->
                                            <li>
                                                <a href="<?=$list[$i]['href']?>" data-lightbox="example-set">
                                                <?php
                                                if ($list[$i]['is_notice']) { // 공지사항  ?>
                                                    <img src="<?php echo $board['bo_gallery_width'].'X'.$board['bo_gallery_height']; ?>/ffffff/?text=공지" class="img-responsive">
                                                <?php } else {
                                                    $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], true, false, ''); // false, true 이미지 확장

                                                    if($thumb['src']) {
                                                        $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img-responsive">';
                                                    } else {
                                                        $img_content = '<img src="http://placehold.it/'.$board['bo_gallery_width'].'X'.$board['bo_gallery_height'].'/ffffff/?text=no+image" class="img-responsive">';
                                                    }

                                                    echo $img_content;
                                                }
                                                 ?>
                                                 <i class="fa fa-eye"></i>
                                                </a>
                                            </li>
                                            <!-- li class="text-center h5"><i class="fa fa-fw fa-user"></i><?php echo $list[$i]['name'] ?></li -->
                                           
                                        </ul> 

이 질문에 댓글 쓰기 :

답변 4

이렇게 변경 하시면 되실듯 합니다 

 

<ul class="list-unstyled thumbnail" style="padding:10px; margin-bottom:5px;">

<!-- gallery picture -->

<li>

<?php

$img_content=$pop_image = ""; 

if ($list[$i]['is_notice']) { // 공지사항  

$pop_image = $board['bo_gallery_width'].'X'.$board['bo_gallery_height'].'/ffffff/?text=공지'; 

$img_content = '<img src="'.$pop_image.'" class="img-responsive">';

} else {

    $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], true, false, ''); // false, true 이미지 확장 

 

    if($thumb['src']) {

$pop_image  = $thumb['src'];

$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img-responsive">';

    } else {

$pop_image  ='http://placehold.it/'.$board['bo_gallery_width'].'X'.$board['bo_gallery_height'].'/ffffff/?text=no+image';

$img_content = '<img src="'.$pop_image.'" class="img-responsive">';

    }

}

?>

<a href="<?=$pop_image?>" data-lightbox="example-set">

<?php  echo $img_content; ?> <i class="fa fa-eye"></i>

</a>

</li>

<!-- li class="text-center h5"><i class="fa fa-fw fa-user"></i><?php echo $list[$i]['name'] ?></li -->

</ul>

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 129,406
© SIRSOFT
현재 페이지 제일 처음으로