New Feeds

[질답/버그/제안] 최신글 위젯 썸네일 질문있어요~!

작성자 정보

  • 나리야 작성
  • 작성일

컨텐츠 정보

본문

올린 이미지가 설정한 썸네일 사이즈 보다 작으면 흰여백이 나와요. 아래 그림처럼요

29a82cbe8a5690ecc43afc15b8c294fc_1661930912_4237.jpg
 

thumbnail.lib.php 파일에 

$is_crop=true, 이걸 한들 false 이걸 한들 변동 사항은 없고...

 

작은 이미지라도 꽉 차고 맞게 나오도록 하려면 어떻게 해야 할까요?



<?php

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


$img_w = $wset['thumb_w'] = ( isset( $wset[ 'thumb_w' ] ) && $wset[ 'thumb_w' ] > 0 ) ? $wset[ 'thumb_w' ] : 803;

$img_h = $wset['thumb_h'] = ( isset( $wset[ 'thumb_h' ] ) && $wset[ 'thumb_h' ] > 0 ) ? $wset[ 'thumb_h' ] : 380;

$imgs_w = $wset[ 'thumb_w' ] = ( isset( $wset[ 'thumb_w' ] ) && $wset[ 'thumb_w' ] > 0 ) ? $wset[ 'thumb_w' ] : 246;

$imgs_h = $wset[ 'thumb_h' ] = ( isset( $wset[ 'thumb_h' ] ) && $wset[ 'thumb_h' ] > 0 ) ? $wset[ 'thumb_h' ] : 120;


// 링크

$is_modal_js = $wset[ 'modal_js' ];

$is_link_target = ( $wset[ 'modal' ] == "2" ) ? ' target="_blank"' : '';


// 추출하기

$wset[ 'image' ] = 1; //이미지글만 추출

$list = apms_board_rows( $wset );

$list_cnt = count( $list );


// 아이콘

$icon = ( isset( $wset[ 'icon' ] ) && $wset[ 'icon' ] ) ? '' . apms_fa( $wset[ 'icon' ] ) . '': '';

$is_ticon = ( isset( $wset[ 'ticon' ] ) && $wset[ 'ticon' ] ) ? true : false;


// 랭킹

$rank = apms_rank_offset( $wset[ 'rows' ], $wset[ 'page' ] );


// 날짜

$is_date = ( isset( $wset[ 'date' ] ) && $wset[ 'date' ] ) ? true : false;

$is_dtype = ( isset( $wset[ 'dtype' ] ) && $wset[ 'dtype' ] ) ? $wset[ 'dtype' ] : 'm.d';

$is_dtxt = ( isset( $wset[ 'dtxt' ] ) && $wset[ 'dtxt' ] ) ? true : false;


// 새글

$is_new = ( isset( $wset[ 'new' ] ) && $wset[ 'new' ] ) ? $wset[ 'new' ] : 'red';


// 댓글

$is_comment = ( isset( $wset[ 'comment' ] ) && $wset[ 'comment' ] ) ? true : false;


// 강조글

$bold = array();

$strong = explode( ",", $wset[ 'strong' ] );

$is_strong = count( $strong );

for ( $i = 0; $i < $is_strong; $i++ ) {


  list( $n, $bc ) = explode( "|", $strong[ $i ] );


  if ( !$n ) continue;


  $n = $n - 1;

  $bold[ $n ][ 'num' ] = true;

  $bold[ $n ][ 'color' ] = ( $bc ) ? ' class="' . $bc . '"': '';

}


?>


 

    

    <?php

    for ( $i = 0; $i < $list_cnt; $i++ ) {

      //print_r2($list[$i]);

      $thumbs = get_list_thumbnail( $list[ $i ][ 'bo_table' ], $list[ $i ][ 'wr_id' ], $img_w, $img_h, false, true );

      $thumbs2 = get_list_thumbnail( $list[ $i ][ 'bo_table' ], $list[ $i ][ 'wr_id' ], $imgs_w, $imgs_h, false, true );

      if ( $thumbs[ 'src' ] ) {

        $img = $thumbs[ 'src' ];

        $imgs = $thumbs2[ 'ori' ];

      }

      ?>

  

   

<?php echo $target;?>>

<?php echo $list[$i]['subject']; ?>

 

    <?php

    }

    ?>

 

<?php if(!$list_cnt) { ?>

글이 없습니다.

<?php } ?>


관련자료

댓글 0
등록된 댓글이 없습니다.
전체 1,963 / 1 페이지
번호
제목
이름

Favorites


최근글


새댓글


  • 댓글이 없습니다.
알림 0