최신글 썸네일 이미지 없을시에 noimage.gif가 넣기 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

최신글 썸네일 이미지 없을시에 noimage.gif가 넣기 정보

최신글 썸네일 이미지 없을시에 noimage.gif가 넣기

본문

이런식으로 넣으려는데요
<img src='$latest_skin_path/noimage.gif' border=0>

아래코드를 어떻게 수정하면되는지 알려주세요.
감사합니다.


<?
$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],55)."</span>"; //제목 글자수 자르기

$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='90' cellpadding='0' cellspacing='0' border='0'>";
echo " <tr><td valign='top' align='center'><a href='{$list[$i]['href']}'><img src='$img' width='80' height='80' border='0'></a></td></tr>";
?>
  • 복사

댓글 전체

$img = "<img src='$latest_skin_path/noimage.gif' border=0 width='$img_width' height='$img_height' title='이미지 없음' align=left style='margin-right:5px; border:0 #222222 solid;'>";
    $thumb = $thumb_path.'/'.$list[$i][wr_id];
    // 썸네일 이미지가 존재하지 않는다면
    if (!file_exists($thumb)) {
        $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
<?
$image = $list[$i][file][0][file]; //원본
$img=$data_path. "/".$image;  //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
$no_img = $latest_skin_path."/noimage.gif";

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

요리 하면 되겠네요.
$image = $list[$i][file][0][file]; //원본
$img=$data_path. "/".$image;  //썸네일이 없을경우 원본출력

2줄 주석처리하시고요. 대신에 아래 코드 넣어주시면 끝!!!!

$img = "<img src='$latest_skin_path/noimage.gif' border=0>";
© SIRSOFT
현재 페이지 제일 처음으로