이미지 최신글 문의 드립니다

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 : http://doli4.dothome.co.kr/gnuboard4/



배추스킨을 사용하고 있습니다

메인 페이지 하단에 이미지 게시판에서 최근 이미지 몇개를 추출해서 보여주려고 합니다

여기 사이트 스킨 게판과 그누보드 사이트 게시판에 있는 스킨 10개 이상을 이용해서 시도해 보았으나, 하나같이 다 이미지가 출력이 안됩니다.

echo로 찍어 보면 이미지를 찾지 못해서 noimage 등의 이미지로 출력이 되거나 이 파일이 없는 스킨들은 그냥 엑박 뜹니다.

thumbnail 이미지 경로는 찾아보니
/data/file/게시판명/thumbnail 이고 그 아래에 숫자로 생성이 되는거 같은데요.

경로도 다 맞게 확인 하였으나 안되네요 ;;



소스부분
<?
$image = $list[$i][file][0][file]; //원본
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];

if ( file_exists($thumb) )
$img = $thumb;

$style = "font-family:돋움; font-size:9pt; color:#636363;";
if ($list[$i][icon_new])
$style = "style='font-family:돋움; font-size:9pt; color:#006F00;' ";
$subject = "<span $style>".cut_str($list[$i][subject],15)."</span>"; //제목 글자수 자르기

// if ($list[$i]['comment_cnt']) //코
// $cmt = "({$list[$i]['comment_cnt']})";

$bg = ""; //새글?
if ($list[$i][icon_new])
$bg="la_top_2.gif";
else
$bg="la_top_1.gif";

echo $list[$i][icon_reply] . " ";

echo "<table width='116' cellpadding='0' cellspacing='0' border='0'>";
echo " <tr><td height='22' background='{$latest_skin_path}/img/$bg' style='padding-top:2px; padding-left:30px;'>{$subject}</td></tr>";
echo " <tr><td background='{$latest_skin_path}/img/la_bg.gif' valign='top' align='center'><a href=\"javascript:;\" OnClick=\"popupImage('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\"><img src='$img' width='100' height='70' border='0'></a></td></tr>";
echo " <tr><td height='21' background='{$latest_skin_path}/img/la_bot.gif' style='padding-left:25px; padding-top:7px;' class='data'>{$list[$i][datetime2]} {$cmt}</td></tr></table>";
?>
</td>
<? } ?>

<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td width=$col_width%>&nbsp;</td>";
}
?>

<? if (count($list) == 0) { echo "<td height=80 align=center>게시물이 없습니다.</td>"; } ?>
</tr>
</table></td>
|

댓글 1개

<?
//$image = $list[$i][file][0][file]; //원본
//$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
//$thumb = $thumb_path. "/". $list[$i][wr_id];
$thumb = "{$g4[path]}/data/file/{$bo_table}/thumbnail/{$list[$i][wr_id]}"; //첫번째 썸네일 이미지 경로

if ( file_exists($thumb)) { ///////// 이미지화일이 존재한가 체크
echo = "<img src='{$thumb}'>"; ////존재하면 불러옴
}else{ ///////////존재하지않다면 아래 출력
echo = "<img src='{$g4[path]}/img/no_image.gif'>";
}


$style = "font-family:돋움; font-size:9pt; color:#636363;";
if ($list[$i][icon_new])
$style = "style='font-family:돋움; font-size:9pt; color:#006F00;' ";
$subject = "<span $style>".cut_str($list[$i][subject],15)."</span>"; //제목 글자수 자르기

// if ($list[$i]['comment_cnt']) //코
// $cmt = "({$list[$i]['comment_cnt']})";

$bg = ""; //새글?
if ($list[$i][icon_new])
$bg="la_top_2.gif";
else
$bg="la_top_1.gif";

echo $list[$i][icon_reply] . " ";

echo "<table width='116' cellpadding='0' cellspacing='0' border='0'>";
echo " <tr><td height='22' background='{$latest_skin_path}/img/$bg' style='padding-top:2px; padding-left:30px;'>{$subject}</td></tr>";
echo " <tr><td background='{$latest_skin_path}/img/la_bg.gif' valign='top' align='center'><a href=\"javascript:;\" OnClick=\"popupImage('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\"><img src='$img' width='100' height='70' border='0'></a></td></tr>";
echo " <tr><td height='21' background='{$latest_skin_path}/img/la_bot.gif' style='padding-left:25px; padding-top:7px;' class='data'>{$list[$i][datetime2]} {$cmt}</td></tr></table>";
?>
</td>
<? } ?>

<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td width=$col_width%>&nbsp;</td>";
}
?>

<? if (count($list) == 0) { echo "<td height=80 align=center>게시물이 없습니다.</td>"; } ?>
</tr>
</table></td>

댓글 작성

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

로그인하기
🐛 버그신고