모르솔라님의 테마형 게시판의 썸네일 어떻게 수정하나요? 정보
모르솔라님의 테마형 게시판의 썸네일 어떻게 수정하나요?본문
모르솔라님의 테마형 게시판에서 이미지 업로드시 생성되는 썸네일의
파일명이 숫자로 생성됩니다.
확장자를 변경하려하는데, 스킨 소스를 봐도 못찾겠네요.
어디서 수정을 해야하는지 사용하신 고수님들 있으시면 알려주세요
파일명이 숫자로 생성됩니다.
확장자를 변경하려하는데, 스킨 소스를 봐도 못찾겠네요.
어디서 수정을 해야하는지 사용하신 고수님들 있으시면 알려주세요
댓글 전체
썸네일 생성시 wr_id값에 따라서 파일명이 변경될겁니다.
즉, 게시물 넘버($wr_id == '$i')가 1이라면 썸네일 파일명이 1로 저장이 되도록 기본 갤러리 스킨에서 설정되어 있습니다.
수정하시려면 다음 부분을 바꿔줘야 합니다.
수정후 파일 삭제라든가 잘 모르신다면 그냥 사용하시는 것이 나을거라 생각됩니다.
그래도 바꿔야 한다면 주석 부분을 잘 보세요.
$img = "<img src='$board_skin_path/img/noimage.gif' border=0 width='$board[bo_1]' title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id]; // $list[$i][wr_id] 이부분
if (!file_exists($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
break;
$rate = $board[bo_1] / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor($board[bo_1], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_2]); //$list[$i][wr_id] 이 부분
chmod($thumb_path.'/'.$list[$i][wr_id], 0606); // $list[$i][wr_id] 이 부분
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
즉, 게시물 넘버($wr_id == '$i')가 1이라면 썸네일 파일명이 1로 저장이 되도록 기본 갤러리 스킨에서 설정되어 있습니다.
수정하시려면 다음 부분을 바꿔줘야 합니다.
수정후 파일 삭제라든가 잘 모르신다면 그냥 사용하시는 것이 나을거라 생각됩니다.
그래도 바꿔야 한다면 주석 부분을 잘 보세요.
$img = "<img src='$board_skin_path/img/noimage.gif' border=0 width='$board[bo_1]' title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id]; // $list[$i][wr_id] 이부분
if (!file_exists($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
break;
$rate = $board[bo_1] / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor($board[bo_1], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_2]); //$list[$i][wr_id] 이 부분
chmod($thumb_path.'/'.$list[$i][wr_id], 0606); // $list[$i][wr_id] 이 부분
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";