첨부파일질문좀 드리겠습니다

첨부파일질문좀 드리겠습니다

QA

첨부파일질문좀 드리겠습니다

본문

안녕하세요 질문좀드리겠습니다

갤러리 리스트부분인데요

첨부파일 2번 이미지가 나오게 하고싶은데 어떻게 해야할까요 ㅠㅠ?

 


   <?php
                if ($list[$i]['is_notice']) { // 공지사항 ?>
                    <strong style="width:<?php echo $board['bo_mobile_gallery_width'] ?>px;height:<?php echo $board['bo_mobile_gallery_height'] ?>px">공지</strong>
                <?php
                } else {
                    $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_mobile_gallery_width'], $board['bo_mobile_gallery_height']);
                    if($thumb['src']) {
                        $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'"  >';
                    } else {
                        $img_content = '<span class="no-img">no image</span>';
                    }
                    echo $img_content;
                }
                ?>

이 질문에 댓글 쓰기 :

답변 2

이렇게 넣어주시면 나올거에요.


<?php
$sql_bf = " select bf_file, bf_content from {$g5['board_file_table']}
   where bo_table = '{$board[bo_table]}' and wr_id = '{$list[$i][wr_id]}' and bf_type between '1' and '3' order by bf_no limit 1, 1 ";
$row_bf = sql_fetch($sql_bf);
if($row_bf['bf_file']) {
 $filename = $row_bf['bf_file'];
 $filepath = G5_DATA_PATH.'/file/'.$board['bo_table'];
 $alt = get_text($row_bf['bf_content']);
 $tname = thumbnail($filename, $filepath, $filepath, $board['bo_mobile_gallery_width'], $board['bo_mobile_gallery_height']);
 $src = G5_DATA_URL.'/file/'.$board['bo_table'].'/'.$tname;
 echo '<img src="'.$src.'" alt="'.$alt.'"  >';
}
?>

알려주신대로 해보니

Warning: Missing argument 6 for thumbnail(), called in /www_root/mobile/skin/board/gallery/list.skin.php on line 132 and defined in /www_root/lib/thumbnail.lib.php on line 192

이런오류가나오네요

알려주신대로 해보니

Warning: Missing argument 6 for thumbnail(), called in /www_root/mobile/skin/board/gallery/list.skin.php on line 132 and defined in /www_root/lib/thumbnail.lib.php on line 192

이런오류가나오네요

$tname = thumbnail($filename, $filepath, $filepath, $board['bo_mobile_gallery_width'], $board['bo_mobile_gallery_height']);

위 코드를 밑에 처럼 false를 추가해주세요.
$tname = thumbnail($filename, $filepath, $filepath, $board['bo_mobile_gallery_width'], $board['bo_mobile_gallery_height'], false);

2번 이미지가 있다고 전제하면

lib / thumbnail.lib.php 파일 13라인쯤 

between '1' and '3' order by bf_no limit 0, 1 ";  이런 부분을 찾아

limit 1, 1 즉, 0을 1로 바꾸시면 되는데 ... 이렇게 되면 이 함수를 사용하는 모든 스킨들에서

그렇게 될테니 따로 함수를 하나 더 만들어 그걸 적용하시던지, 아니면 extend폴더에 넣어 그걸 사용하셔야 겠네요. 

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

회원로그인

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