C

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

· 2012-11-05 (월) 17:31:40 · 1664 · 2
안녕하세요.

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

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


<?
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 해도 안되구요.

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

댓글 2개

http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=29882 참고 하시구요

에디터는 $list[$i]['wr_content'] 부분에서 추출합니다.
건즈님 감사합니다. 많은 도움 되었어요..
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
12-11-06 조회 624
12-11-06 조회 1,798
12-11-06 조회 758
12-11-05 조회 1,071
12-11-05 조회 1,883
12-11-05 조회 2,017
12-11-05 조회 1,681
12-11-05 조회 1,149
12-11-05 조회 1,071
12-11-05 조회 1,053
12-11-05 조회 1,335
12-11-05 조회 1,665
12-11-05 조회 938
12-11-05 조회 1,798
12-11-05 조회 1,147
12-11-05 조회 890
12-11-05 조회 1,631
12-11-05 조회 2,412
12-11-05 조회 1,465
12-11-05 조회 994