갤러리 리스트 이미지가 안뜹니다.. 정보
갤러리 리스트 이미지가 안뜹니다..본문
댓글 전체

list.skin.php 열어서
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
밑에
$img_width = 120; // 이미지의 폭
$img_height = 88; // 이미지의 높이
$img_quality = 80; // 이미지의 질(quality)
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
넣으시고
for ($i=0; $i<count($list); $i++) {
를 찾아 그 밑에
//목록 썸네일 일괄 생성
$img = "<img src='$board_skin_path/img/noimage.gif' style='border:1px solid #F0F0F0;' border=0 width='$img_width' height='$img_height' title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb)) { // thumb 이미지 여부 확인/없으면 썸네일 생성
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)){
$size = @getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $img_height)
$dst = imagecreatetruecolor($img_width, $height);
else
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
넣어 줘보세요.
write_update.skin.php 에서 생성도 괜찮지만 목록상에서 썸네일 생성 안된 게시물 찾아 일괄적으로 만들어 주는것도 좋습니다.
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
밑에
$img_width = 120; // 이미지의 폭
$img_height = 88; // 이미지의 높이
$img_quality = 80; // 이미지의 질(quality)
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
넣으시고
for ($i=0; $i<count($list); $i++) {
를 찾아 그 밑에
//목록 썸네일 일괄 생성
$img = "<img src='$board_skin_path/img/noimage.gif' style='border:1px solid #F0F0F0;' border=0 width='$img_width' height='$img_height' title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb)) { // thumb 이미지 여부 확인/없으면 썸네일 생성
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)){
$size = @getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $img_height)
$dst = imagecreatetruecolor($img_width, $height);
else
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
넣어 줘보세요.
write_update.skin.php 에서 생성도 괜찮지만 목록상에서 썸네일 생성 안된 게시물 찾아 일괄적으로 만들어 주는것도 좋습니다.
아..감사합니다..추천을 잘못했네요ㅜㅜ

"이미지가 안 뜨는 상황을 그대로 보이게"해야
상황 파악을 알 수가 있겠네요.
상황 파악을 알 수가 있겠네요.

list.skin.php 과 write_update.skin.php 의
썸네일 생성 소스중에
아래소스찾아
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], 퀄리티); //png
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], 퀄리티); //jpeg
png 로 되어있으면 jpeg 로 변경.
※list.skin.php,write_update.skin.php 두 개 다 변경해야 함!!
지나가다가 보실 분들을 위해...뒷북 작렬..sorry..
썸네일 생성 소스중에
아래소스찾아
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], 퀄리티); //png
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], 퀄리티); //jpeg
png 로 되어있으면 jpeg 로 변경.
※list.skin.php,write_update.skin.php 두 개 다 변경해야 함!!
지나가다가 보실 분들을 위해...뒷북 작렬..sorry..
리풀달게 만드네요.밀림님 감사합니다.
정말 답답했는데 요긴한 팁이었습니다.
정말 답답했는데 요긴한 팁이었습니다.