크롬에서 작성을 하면 최근게시물에 출력이 안됩니다.

choogo_net_20130622_205606.jpg
CHEditor 출력 가능한 최근게시물을 사용하고 있습니다.
문제는 익스플로러에서 문제 없습니다. 그러나 크롬에서 CHEditor를 이용해서 사진을 불러오게 되면
최근게시물에 출력이 안됩니다.(크롬에서도 첨부파일 이미지는 출력되네요...;)

참고로요, 첨부한 파일 보시면 [즐길거리]게시판은 크롬에서 작성, [직접 찍은 사진]게시판은 익스플로어에서 작성테스트 했습니다..

↓밑에는 사용중인 스킨의 소스인데요, 뭐가 잘못되었는지 알려주십시오...(__)

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

$img_width = 100; // 이미지 가로 사이즈
$img_height = 80; // 이미지 세로 사이즈
$img_quality = '99'; //퀼리티 100이하로 설정

$mod = 5; // 한줄 출력개수

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

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

?>
<table cellpadding="0" cellspacing="0" width="100%" background="<?=$latest_skin_path?>/img/subject_bg.gif">
<tr height="35">
<td style="padding-left:10;">
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color="#555555"><b><?=$board[bo_subject]?></b></font></a>
</td>
<td align="right"><img src='<?=$latest_skin_path?>/img/icon.gif'><span style="font-size: 12px; color: #646464; font-family:dotum; letter-spacing:-1;"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'>&nbsp;더 보기</a></span>&nbsp;&nbsp;</td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 width="100%">
<tr>
<td height="10" colspan="<?=$mod;?>"></td>
</tr>
<tr>

<?
for ($i=0; $i<count($list); $i++) {
if ($i && $i%$mod==0)
echo "</tr><tr><td height=\"10\"></td></tr><tr>";
?>
<td align="center" valign="top">
<?
$img = "<div style=\"border:1px #d9d9d9 solid;height:{$img_height}px;width:{$img_width}px;\"><a href='{$list[$i]['href']}'><img src=\"$latest_skin_path/img/no_image.gif\" border=\"0\" height=\"{$img_height}\" width=\"{$img_width}\"/></a></div><div style=\"margin-top:3px\"><a href='{$list[$i]['href']}'>{$list[$i]['subject']}</a></div>";
$thumb = $thumb_path.'/'.$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 = $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);
} else { //게디터에서 삽입한 이미지 뽑자ㅠㅠ
$edit_img = $list[$i]['wr_content'];
if (preg_match("/data\/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)/i", $edit_img, $tmp)) { // data/cheditor4------
$file = './' . $tmp[0]; // 파일명
$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 = $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);
}
}
}

if (file_exists($thumb)){
$img = "<div style=\"border:1px #d9d9d9 solid;height:{$img_height}px;width:{$img_width}px;\"><a href='{$list[$i]['href']}'><img src=\"$thumb\" border=\"0\" width=\"$img_width\" height=\"$img_height\"/></a></div><div style=\"margin-top:3px\"><a href='{$list[$i]['href']}'>{$list[$i]['subject']}</a></div>";
}

echo $img;
?>

</td>
<?}?>
<?
// 나머지 td
$cnt = $i%$mod;
if ($cnt){
for ($i=$cnt; $i<$mod; $i++)
echo "<td height=\"$img_height\">&nbsp;</td>";
}
?>
</tr>
<tr>
<td height="6" colspan="<?=$mod;?>"></td>
</tr>
<? if (count($list) == 0) { ?><tr><td align=center height=100 valign="middle"><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>

첨부파일

|

댓글 2개

소스는 안봤습니다. 그냥 한글만 읽었어요^^;

제 경험상 이런경우 십중팔구는 웹표준을 따르지 않아서 그렇습니다.
html 코드를 정리하면 크롬에서도 나올꺼라 예상됩니다.

table 태그를 다 지우고, div 태그로 해서 간단히 하나만 불러와서 출력 해 보세요.
답변 감사합니다..그럴거라 예상은 했지만...ㅋ 어디가 웹표준을 따르지 않았는지 잘 몰라서요..^^;

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기
🐛 버그신고