채택완료

갤러리 최신글 추출

2019-09-05 (목) 19:09:01 3,483

갤러리이미지를 

최신글로 추출할때

이미지의 특정부분 ( 중앙 ) 부분만 크롭해서

보여지게끔 하려면 어떤방법이 있어야 할까요? ㅠㅠ

<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
$thumb_width = 200;
$thumb_height = 300;


?>

<script>

<script src="<?=$latest_skin_url?>/js/modernizr.custom.97074.js"></script>


<div class="grid">

<?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']) {
        $thumb_url = $thumb['src'];
    } else {
        $thumb_url = $latest_skin_url."/img/no-image.gif";
    }
?>
    <figure class="effect-julia">
        <a href="<?=$list[$i]['href']?>"><img src="<?php echo $thumb['src']?>" alt=""/></a>
    </figure>
    
<?php    }    ?>    
</div>


<div style="clear:both"></div>

|

답변 1개

채택된 답변
+20 포인트

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

여기를 이렇게 수정 후 관리자 페이지 > 환경설정 > 썸네일파일 일괄삭제

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

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