채택완료

썸네일 추출 시 사이즈 원본 추출

$thumb_width = 800;
$thumb_height = 600;
이부분을 제외하고 호출할 수 있을까요..?
썸네일에 800*600 이게 안붙게하려구요..

Copy
<?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 = 800;
$thumb_height = 600;
$list_count = (is_array($list) && $list) ? count($list) : 0;

?>
<?php
    for ($i=0; $i<$list_count; $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 = $latest_skin_url.'/img/no_img.jpg';
        //$thumb['alt'] = '이미지가 없습니다.';
    }
    $img_content = '<img src="'.$img.'" alt="'.$thumb['alt'].'" style="width:100%;">';
    $wr_href = get_pretty_url($bo_table, $list[$i]['wr_id']);
        
    $wr_content = preg_replace("/<(.*?)\>/","",$list[$i]['wr_content']);
    $wr_content = preg_replace("/&nbsp;/","",$wr_content);
    $wr_content = cut_str(get_text($wr_content),45);
?>
|

답변 2개

채택된 답변
+20 포인트

$img = $thumb['src'];
일단 여기를 이렇게 수정해보세요.
$img = $thumb['ori'];

참고 https://gnustudy.com/bbs/board.php?bo_table=skin_latest&wr_id=36

2021-09-08 (수) 20:46:18

아하 그렇군요

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