도와주세요..갤러리 스킨에서 이미지 리사이즈가 안되요ㅠㅠ 정보
도와주세요..갤러리 스킨에서 이미지 리사이즈가 안되요ㅠㅠ본문
도무지 무엇이 문제인지 모르겠어서 질문합니다..ㅠㅠ
관리자에서 이미지사이즈 및 테이블 폭 모두 650으로 적용을 시켜놨는데
이미지를 올리면 이미지가 원본사이즈 그대로 엄청 크게 나옵니다..
-- write_update 스킨을 그대로 다운로드 받아서 적용시켰는데 왜 그럴까요..?
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 자신만의 코드를 넣어주세요.
//print_r2($_FILES); exit;
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
if ($_FILES[bf_file][name][0])
{
$row = sql_fetch(" select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '0' ");
$file = $data_path .'/'. $row[bf_file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $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);
@unlink($thumb_path.'/'.$wr_id);
// 계산된 높이가 설정된 높이보다 작다면
if ($height < $board[bo_2])
$dst = imagecreatetruecolor($board[bo_1], $height);
else
$dst = imagecreatetruecolor($board[bo_1], $board[bo_2]);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$wr_id, $board[bo_3]);
chmod($thumb_path.'/'.$wr_id, 0606);
}
}
?>
한가지 특이점은 게시판 상단내용에 소스를 넣었는데 그것 때문인가요?
--
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
<tr>
<td align="center" valign="top" background="/imgs/bg_gra.gif"><table width="988" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"> </td>
</tr>
<tr>
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="988" height="49">
<param name="movie" value="/imgs/newyork_03.swf?pageNum=3&subNum=2">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="/imgs/newyork_03.swf?pageNum=3&subNum=2" width="988" height="49" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed></object></td>
</tr>
<tr>
<td><img src="/guest/imgs/visual.jpg" width="988" height="133"></td>
</tr>
<tr>
<td height="15"></td>
</tr>
<tr>
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="/guest/imgs/title.gif" width="172" height="71"></td>
</tr>
<tr>
<td><a href="/guest/news.htm"><img src="/guest/imgs/sub_menu1.gif" width="172" height="30" border="0"></a></td>
</tr>
<tr>
<td><a href="/guest/gallery.htm"><img src="/guest/imgs/sub_menu2_on.gif" width="172" height="30" border="0"></a></td>
</tr>
<tr>
<td><a href="/guest/q&a.htm"><img src="/guest/imgs/sub_menu3.gif" width="172" height="30" border="0"></a></td>
</tr>
<tr>
<td><a href="/guest/reservation.htm"><img src="/guest/imgs/sub_menu4.gif" width="172" height="30" border="0"></a></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
<td width="12"> </td>
<td width="804" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="35" height="18"></td>
<td width="734"></td>
<td width="35"></td>
</tr>
<tr>
<td> </td>
<td><img src="/guest/imgs/gallery_title.gif" width="734" height="32"></td>
<td> </td>
</tr>
<tr>
<td height="25"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="18"> </td>
<td><img src="/guest/imgs/gallery_text.gif" width="734" height="69"></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="85"> </td>
<td>
--------------이렇게 게시판 상단내용을 넣었는데..
아무리 다른 갤러리 스킨을 적용시켜봐도.. 리사이즈 안되는건 마찬가지입니다..
올릴때마다 사진 사이즈를 줄여서 올릴수는 없는데..=.=;
도와주세요..ㅠㅠ
관리자에서 이미지사이즈 및 테이블 폭 모두 650으로 적용을 시켜놨는데
이미지를 올리면 이미지가 원본사이즈 그대로 엄청 크게 나옵니다..
-- write_update 스킨을 그대로 다운로드 받아서 적용시켰는데 왜 그럴까요..?
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 자신만의 코드를 넣어주세요.
//print_r2($_FILES); exit;
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
if ($_FILES[bf_file][name][0])
{
$row = sql_fetch(" select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '0' ");
$file = $data_path .'/'. $row[bf_file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $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);
@unlink($thumb_path.'/'.$wr_id);
// 계산된 높이가 설정된 높이보다 작다면
if ($height < $board[bo_2])
$dst = imagecreatetruecolor($board[bo_1], $height);
else
$dst = imagecreatetruecolor($board[bo_1], $board[bo_2]);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$wr_id, $board[bo_3]);
chmod($thumb_path.'/'.$wr_id, 0606);
}
}
?>
한가지 특이점은 게시판 상단내용에 소스를 넣었는데 그것 때문인가요?
--
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
<tr>
<td align="center" valign="top" background="/imgs/bg_gra.gif"><table width="988" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"> </td>
</tr>
<tr>
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="988" height="49">
<param name="movie" value="/imgs/newyork_03.swf?pageNum=3&subNum=2">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="/imgs/newyork_03.swf?pageNum=3&subNum=2" width="988" height="49" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed></object></td>
</tr>
<tr>
<td><img src="/guest/imgs/visual.jpg" width="988" height="133"></td>
</tr>
<tr>
<td height="15"></td>
</tr>
<tr>
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="/guest/imgs/title.gif" width="172" height="71"></td>
</tr>
<tr>
<td><a href="/guest/news.htm"><img src="/guest/imgs/sub_menu1.gif" width="172" height="30" border="0"></a></td>
</tr>
<tr>
<td><a href="/guest/gallery.htm"><img src="/guest/imgs/sub_menu2_on.gif" width="172" height="30" border="0"></a></td>
</tr>
<tr>
<td><a href="/guest/q&a.htm"><img src="/guest/imgs/sub_menu3.gif" width="172" height="30" border="0"></a></td>
</tr>
<tr>
<td><a href="/guest/reservation.htm"><img src="/guest/imgs/sub_menu4.gif" width="172" height="30" border="0"></a></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
<td width="12"> </td>
<td width="804" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="35" height="18"></td>
<td width="734"></td>
<td width="35"></td>
</tr>
<tr>
<td> </td>
<td><img src="/guest/imgs/gallery_title.gif" width="734" height="32"></td>
<td> </td>
</tr>
<tr>
<td height="25"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="18"> </td>
<td><img src="/guest/imgs/gallery_text.gif" width="734" height="69"></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="85"> </td>
<td>
--------------이렇게 게시판 상단내용을 넣었는데..
아무리 다른 갤러리 스킨을 적용시켜봐도.. 리사이즈 안되는건 마찬가지입니다..
올릴때마다 사진 사이즈를 줄여서 올릴수는 없는데..=.=;
도와주세요..ㅠㅠ
댓글 전체
<script language="JavaScript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript">
window.onload=function() {
resizeBoardImage(<?=(int)$board[bo_image_width]?>);
drawFont();
}
</script>
view.skin.php 맨밑에다 이걸 한번 넣어보세요
<script language="JavaScript">
window.onload=function() {
resizeBoardImage(<?=(int)$board[bo_image_width]?>);
drawFont();
}
</script>
view.skin.php 맨밑에다 이걸 한번 넣어보세요