채택완료

갤러리게시판 썸네일 생성 크기는 어디서 설정이 되나요?

2024-03-08 (금) 22:19:00 1,771

갤러리 게시판에 write시 파일에 이미지를 등록하면 썸네일 파일이 생성이 되는데

이 썸네일 생성 크기는 어디서 지정이 되나요?

file 폴더에 보면 thumb-asdr03irdasjkdfshf92hf92ls-200x150.jpg 이런식으로 이미지가 생성이 되어 있는데

어디서 200x150 사이즈를 설정하는지 모르겠네요

|

답변 1개

채택된 답변
+20 포인트
2024-03-08 (금) 22:37:11

예전에 작업하면서 latest.skin.php 부분에 적용했던 부분입니다.

다음을 참고하셔서 구현하시면 되지 않을까 합니다

Copy
<?php

if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

include_once(G5_LIB_PATH.'/thumbnail.lib.php');

 

// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨

 

$thumb_width = 275;

$thumb_height = 163;

?>

 

<section id="other_product">

            <h3>다른메뉴 보기</h3>

            <div class="slide_area">

                <ul class="swiper-wrapper">

    <?php

    for ($i=0; $i<count($list); $i++) {

    $thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);

 

    if($thumb['src']) {

        $img = $thumb['src'];

    } else {

        $img = G5_IMG_URL.'/no_img.png';

        $thumb['alt'] = '이미지가 없습니다.';

    }

    $img_content = '<img src="'.$img.'">';

    ?>

                    <li class="swiper-slide">

                        <a href="<?php echo $list[$i]['href'];?>">

                        <div class="pdt_img">

                            <?php echo $img_content; ?></div>

                            <div class="pdt_tit"><?php echo $list[$i]['subject'] ?></div>

                        </a>

                    </li>

        <?php }  ?>

    <?php if (count($list) == 0) { //게시물이 없을 때  ?>

    <li class="empty_li">등록된 메뉴가 없습니다.</li>

    <?php }  ?>

    </ul>

    <div class="slide_btns">

                    <button class="slide_prev" tabindex="0" role="button" aria-label="Previous slide"><img src="<?php echo $latest_skin_url ?>/img/prev.png" alt="이전"></button>

                    <button class="slide_next" tabindex="0" role="button" aria-label="Next slide"><img src="<?php echo $latest_skin_url ?>/img/next.png" alt="다음"></button>

                </div>

            </div>

        </section>

위 처럼 하면  thumb-6a07ade878809bdb2d9570e34e377c41_84LqJn7r_8e307f5bef9fced5d11cde14603cd1dbed5602cd_275x163.jpg 이러한 형식으로 출력이 됩니다.

Q. 

갤러리 게시판에 write시 파일에 이미지를 등록하면 썸네일 파일이 생성이 되는데

이 썸네일 생성 크기는 어디서 지정이 되나요?

A. 관리자 페이지 > 게시판관리 > 해당 게시판에서 이미지 크기를 설정하시면 됩니다.

답변을 작성하려면 로그인이 필요합니다.