에디터를 통해 그림을 올렸을 시, 썸네일 추출 방법? > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

에디터를 통해 그림을 올렸을 시, 썸네일 추출 방법? 정보

에디터를 통해 그림을 올렸을 시, 썸네일 추출 방법?

본문

안녕하세요.

썸네일을 자동 생성하는 최신글 스킨을 쓰고 있는데요,

이미지 생성까지 소스는 다음과 같습니다.


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

include_once("$g4[path]/lib/thumb.lib.php");
include_once("./_common.php");

/******설정**************/
if (!$board[bo_1]) $board[bo_1]=102; //목록 썸네일 가로
if (!$board[bo_2]) $board[bo_2]=76; //목록 썸네일 세로
if (!$board[bo_3]) $board[bo_3]=99; //해상도
/******설정**************/



if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 최신글입니다.");


$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);

$mod = $board[bo_gallery_cols];
$td_width = (int)(99 / $mod);
 
$sql="select * from {$g4['board_file_table']} where  bo_table='$bo_table' and bf_file !='' order by bf_datetime asc  limit 1 ";
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
$file=$data_path .'/'. $row[bf_file];
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
$list[$i]['bo_table'] = $board['bo_table'];
$thumb = $g4[path]."/data/file/" .$list[$i][bo_table]. "/thumbnail/" .$list[$i][wr_id];


if($row[bf_file]){
$img="<a href='{$g4[bbs_path]}/board.php?bo_table={$bo_table}&wr_id={$row[wr_id]}'><img src='".thumbnail($file,$board[bo_1],$board[bo_2])."' border='0' style='border:1px solid #333333'></a>";
} else{
$img="<img src='".$latest_skin_path."/img/noimg.gif' border='0' style='border:1px solid #333333'>";
}

?>


그런데,  에디터를 통해 그림을 올렸을 때, 썸네일이 추출되지 않습니다.

위 썸네일 경로에서 .$list[$i][wr_id]. 부분이 추출되지 않아요. 걍 $wr_id 해도 안되구요.

뭐가 문제일까요.. 아시는 분 답변을 주시면 고맙겠습니다.
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로