최신 갤러리가 보였다 안보였다 합니다.ㅠㅠ 정보
최신 갤러리가 보였다 안보였다 합니다.ㅠㅠ본문
이것저것 짜깁기 해서 최신 갤러리를 메인에 붙였는데요
어쩔땐 이미지가 다 보이고 어쩔땐 보이다 말고..어쩔땐 또 중간 중간 반만 보이고 합니다.
메인에 들어갔다 다른데 클릭했다가 다시 메인에 돌아올때도 그렇고..
아예 접속시부터 안보일때도 있고..
질문답변 검색해도 저랑 비슷한 현상의 질문이 있는데
답변은 안달려있어서 고수임들께 도움 요청합니다
기존 최신갤러리에 비률대로 나오게 스크립트를 붙이다 보니
이런 오류가 나오는걸까요?
오류 주소는
http://www.photoagit.com/
최신글 리스트 소스는..
--------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<script language="javascript">
function resizeImg(imgObj) {
// 이미지 별도 로딩으로 원래 사이즈 추출
var imgOriginal = new Image();
imgOriginal.src = imgObj.src;
// 가로와 세로 중 어느걸 기준으로 줄일지 결정
var baseAxis;
if ( (imgOriginal.width / imgObj.width) > (imgOriginal.height / imgObj.height) )
baseAxis = 'width';
else
baseAxis = 'height';
// 결정된 기준을 바탕으로 나머지 길이를 리사이징
if (baseAxis == 'width') {
imgObj.height = Math.round(imgOriginal.height * (imgObj.width / imgOriginal.width));
} else { // baseAxis == 'height'
imgObj.width = Math.round(imgOriginal.width *
(imgObj.height / imgOriginal.height));
}
}
</script>
<table width='98%' border='0' cellspacing='1' cellpadding='0' bgcolor='#dddddd'>
<tr>
<td>
<table width='100%' border='0' cellspacing='0' cellpadding='3'>
<tr bgcolor='#F0F0F0'>
<td width='16'><img src='<?=$latest_skin_path?>/img/icon_title.gif' width='16' height='16'></td>
<td width='100%' height="30" align="left">:: <a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><b><?=$board[bo_subject]?></a></b> ::</a></td><td align="right">
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/icon_more.gif' border=0></a></td>
</tr>
<tr>
<td width='16' bgcolor='#FFFFFF'> </td>
<td colspan="2" bgcolor='#FFFFFF' width='100%'>
<table width=98% border=0>
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i > 0)
echo '<td width=20> </td>';
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 80);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
echo <<<HEREDOC
<td width='120' valign='top' align='center'>
<table width='120' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td width='120' height='5' align='center'></td>
</tr>
<tr>
<td width='120' height='100' align='center'>
<div style='width:120px;height:100px;border:1px solid #CCCCCC;padding:3px' align='center'>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><img src='{$img}' width=120 height=120 onload="resizeImg(this)"></a>
</div>
</td>
</tr>
<tr>
<td width='120' height='5' align='center'></td>
</tr>
<tr>
<td width='120' height='20' align='center'><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>{$list[$i][subject]}{$list[$i]['comment_cnt']}</a></td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr>
</table>
<? if (count($list) == 0) { ?>게시물이 없습니다.<? } ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
------------------------------------
입니다.
문제 해결 도움좀 부탁 드립니다.
어쩔땐 이미지가 다 보이고 어쩔땐 보이다 말고..어쩔땐 또 중간 중간 반만 보이고 합니다.
메인에 들어갔다 다른데 클릭했다가 다시 메인에 돌아올때도 그렇고..
아예 접속시부터 안보일때도 있고..
질문답변 검색해도 저랑 비슷한 현상의 질문이 있는데
답변은 안달려있어서 고수임들께 도움 요청합니다
기존 최신갤러리에 비률대로 나오게 스크립트를 붙이다 보니
이런 오류가 나오는걸까요?
오류 주소는
http://www.photoagit.com/
최신글 리스트 소스는..
--------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<script language="javascript">
function resizeImg(imgObj) {
// 이미지 별도 로딩으로 원래 사이즈 추출
var imgOriginal = new Image();
imgOriginal.src = imgObj.src;
// 가로와 세로 중 어느걸 기준으로 줄일지 결정
var baseAxis;
if ( (imgOriginal.width / imgObj.width) > (imgOriginal.height / imgObj.height) )
baseAxis = 'width';
else
baseAxis = 'height';
// 결정된 기준을 바탕으로 나머지 길이를 리사이징
if (baseAxis == 'width') {
imgObj.height = Math.round(imgOriginal.height * (imgObj.width / imgOriginal.width));
} else { // baseAxis == 'height'
imgObj.width = Math.round(imgOriginal.width *
(imgObj.height / imgOriginal.height));
}
}
</script>
<table width='98%' border='0' cellspacing='1' cellpadding='0' bgcolor='#dddddd'>
<tr>
<td>
<table width='100%' border='0' cellspacing='0' cellpadding='3'>
<tr bgcolor='#F0F0F0'>
<td width='16'><img src='<?=$latest_skin_path?>/img/icon_title.gif' width='16' height='16'></td>
<td width='100%' height="30" align="left">:: <a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><b><?=$board[bo_subject]?></a></b> ::</a></td><td align="right">
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/icon_more.gif' border=0></a></td>
</tr>
<tr>
<td width='16' bgcolor='#FFFFFF'> </td>
<td colspan="2" bgcolor='#FFFFFF' width='100%'>
<table width=98% border=0>
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i > 0)
echo '<td width=20> </td>';
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 80);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
echo <<<HEREDOC
<td width='120' valign='top' align='center'>
<table width='120' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td width='120' height='5' align='center'></td>
</tr>
<tr>
<td width='120' height='100' align='center'>
<div style='width:120px;height:100px;border:1px solid #CCCCCC;padding:3px' align='center'>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><img src='{$img}' width=120 height=120 onload="resizeImg(this)"></a>
</div>
</td>
</tr>
<tr>
<td width='120' height='5' align='center'></td>
</tr>
<tr>
<td width='120' height='20' align='center'><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>{$list[$i][subject]}{$list[$i]['comment_cnt']}</a></td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr>
</table>
<? if (count($list) == 0) { ?>게시물이 없습니다.<? } ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
------------------------------------
입니다.
문제 해결 도움좀 부탁 드립니다.
댓글 전체