썸네일을 첫번째, 두번째, 세번째등 개별로 뽑아 보기 > 그누보드5 팁자료실

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!

그누보드5 팁자료실

썸네일을 첫번째, 두번째, 세번째등 개별로 뽑아 보기 정보

썸네일을 첫번째, 두번째, 세번째등 개별로 뽑아 보기

첨부파일

이미지 002.png (287.2K) 37회 다운로드 2015-01-15 19:54:02

본문

lib/thumbnail.lib.php

// 게시글리스트 썸네일 생성
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 = "";
    $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 ";
    $row = sql_fetch($sql);


skin/board/gallery/list.skin.php

                    <?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;
                    }
                    ?>

이렇게 수정해서 사용해 보세요..
추천
3

댓글 11개

글 보고 수정해 봣씁니다.
lib 파일과 list스킨 수정햇는데 썸네일 한개가 3개로 나오네요. 어떤 부분이 잘못된 것일까요?
http://gooddirectcar.com/bbs/board.php?bo_table=review&page=  요렇게 나와요~ 어떤 부분 수정하면 가능할까요? 부탁드립니다. 감사합니다.
수정1
$um_value='80/0.5/3', $option=0)
수정2
bf_no limit $option, 1 ";
수정3
$thumb2 = ~~~ '80/0.5/3', 1);
수정4
$thumb3 = ~~~ '80/0.5/3', 2);

모두 정확히해보세요.썸네일 한번지워주시구요
답변감사드립니다.

제가 잘 볼줄 몰라서 ... 자꾸 답답한 소리하고 있나 봐요...


-----------$crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3', $option=0)
-----------order by bf_no limit $option, 1 ";

list 에다가는

                <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 = '<ul class="list_img"><li><img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'"></li>';
                            $img_content .= '<li><img src="'.$thumb2['src'].'" alt="'.$thumb2['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'"></li>';
                            $img_content .= '<li><img src="'.$thumb3['src'].'" alt="'.$thumb3['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'"></li></ul>';
                        } 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>


요렇게 넣어줬는데요.
썸네일 정리하기 버튼 눌러서 정리도 했구요.
그런데 똑같아요... 혹시 제가 수정한 글중에 오타나 그런게 있어서 그럴까요?
전체 2,453 |RSS
그누보드5 팁자료실 내용 검색

회원로그인

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