게시판 썸네일 2~3개 (파일첨부 의 이미지)

게시판 썸네일 2~3개 (파일첨부 의 이미지)

QA

게시판 썸네일 2~3개 (파일첨부 의 이미지)

본문

https://sir.kr/g5_tip/2410

 

제로나라님이 남겨주신 글을 활용해서 모두 작성하였는데, 썸네일이 3개는 노출이 되는데 첫번째 파일첨부한 이미지만 3개가 나오는 상태입니다 ㅠㅠ 

 

파일 1번이 첫번째 썸네일

파일 2번이 두번째 썸네일

파일 3번이 세번째 썸네일 

 

이렇게 나와야하는데 

 

파일 1번의 첫번째썸네일만 3개가 나오게 되고 있습니다.

 

해결방법 자문좀 구해봅니다 ㅠ

이 질문에 댓글 쓰기 :

답변 2

thub 가져올때 option값 제대로 넣으신건가요?

코드를 올려주셔야될거같네요

수정부분은 이렇습니다.

 

function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=true, $crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3', $option=0)
{
    global $g5, $config;
    $filename = $alt = $data_path = '';
    $edt = false;
    
    $sql = " select bf_file, bf_content from {$g5['board_file_table']}
                where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_type between '1' and '3' order by bf_no limit $option, 1 ";
 

 

 

 

list.skin

 

<li class="gall_href">
                    <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']);

                        
                        $thumb2 = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], 'false', 'true', 'center', 'false', '80/0.5/3', 1);
                        
                        $thumb3 = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], 'false', 'true', 'center', 'false', '80/0.5/3', 2);
                        
                        
                        if($thumb['src']) {
                            $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
                            
                            $img_content .= '<br><img src="'.$thumb2['src'].'" alt="'.$thumb2['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
                            $img_content .= '<br><img src="'.$thumb3['src'].'" alt="'.$thumb3['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
                            
                            
                           
                        } else {
                            $img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
                        }

                        echo $img_content;
                    }
                     ?>
                    </a>
                </li>

 

 

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

회원로그인

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