최신글 갤러리 썸네일이 출력이 됐다 안됐다 합니다.

최신글 갤러리 썸네일이 출력이 됐다 안됐다 합니다.

QA

최신글 갤러리 썸네일이 출력이 됐다 안됐다 합니다.

본문

<?php

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

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

 

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

add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);

 

$thumb_width  = isset($options['thumb_width']) ? $options['thumb_width'] : $board['bo_gallery_width'];

$thumb_height = isset($options['thumb_height']) ? $options['thumb_height'] : $board['bo_gallery_height'];

$content_length = isset($options['content_length']) ? $options['content_length'] : 30;

?>

 

<!-- <?php echo $bo_subject; ?> 최신글 시작 { -->

<div class="lt_gal">

    <strong class="lt_title"><a href="<?php echo G5_BBS_URL; ?>/board.php?bo_table=<?php echo $bo_table; ?>"><?php echo $bo_subject; ?></a></strong>

    <div class="lt_gal_Box">

        <ul>

            <?php

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

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

        

                if($thumb['src']) {

                    $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$thumb_width.'" height="'.$thumb_height.'">';

                } else {

                    $img_content = '<span style="width:'.$thumb_width.'px;height:'.$thumb_height.'px" class="no_img">no image</span>';

                }

            ?>

                <li>

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

                    <?php

                    echo "<a href=\"".$list[$i]['href']."\" class=\"lt_tit\">";

                    if ($list[$i]['is_notice'])

                        echo "<strong>".$list[$i]['subject']."</strong>";

                    else

                        echo $list[$i]['subject'];

                    echo "</a>";

                     ?>

                     <p class="lt_detail"><?php echo get_text(cut_str(strip_tags($list[$i]['wr_content']), $content_length), 1); ?></p>

                </li>

            <?php }  ?>

        

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

                <li class="no_bd">게시물이 없습니다.</li>

            <?php }  ?>

        </ul>

    </div>

    <div class="lt_gal_more"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>"><span class="sound_only"><?php echo $bo_subject ?></span>더보기</a></div>

</div>

<!-- } <?php echo $bo_subject; ?> 최신글 끝 -->

 

이 소스인데요

커뮤니티 테마를 이용중입니다 (https://sir.kr/g5_theme/249?page=3)

처음에는 가끔 출력이 되기도 하는데 새로고침을 하면 노이미지가 뜹니다.

어떤 부분이 잘못된 걸까요?

이 질문에 댓글 쓰기 :

답변 2

여기를 

 

$thumb_width  = isset($options['thumb_width']) ? $options['thumb_width'] : $board['bo_gallery_width'];

$thumb_height = isset($options['thumb_height']) ? $options['thumb_height'] : $board['bo_gallery_height'];

$content_length = isset($options['content_length']) ? $options['content_length'] : 30;

 

이렇게 해보세요.

 

$thumb_width  = 170;

$thumb_height = 149;

$content_length = 30;

해당 썸네일 넓이와 높이에 작은별님과 같이

강제적으로 원하시는 사이즈를 입력하시면 됩니다.

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

회원로그인

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