최신갤러리에서 이미지가 없을경우 noimage.gif 출력하는법좀... > 그누4 질문답변

그누4 질문답변

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

최신갤러리에서 이미지가 없을경우 noimage.gif 출력하는법좀... 정보

최신갤러리에서 이미지가 없을경우 noimage.gif 출력하는법좀...

본문

현재 스킨을 사용하고 있는 중입니다.

근데 해당 스킨에는 이미지를 첨부안했을때 엑박을 띄우더군요....


if문을 써서 noimage 출력구문을 추가해줘야할듯싶은데..워낙 초보인지라 이렇게 부탁드립니다..


==========================================================================

<? for ($i=0; $i<count($list); $i++) {
  if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>

<td width="<?=$col_width?>%" align="center" valign='top'>

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

    echo $list[$i][icon_reply] . " ";
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>";
echo "<tr><td valign='top' align='center'><a href='{$list[$i]['href']}'><img src='$img' width='{$imgwidth}' height='{$imgheight}' align='absmiddle' style='width:{$imgwidth}px;height:{$imgheight}px;border:1px solid #CCCCCC; padding:0px'></a></td></tr>";
echo "<tr><td align='center' height='20'><a href='{$list[$i]['href']}'><span style='font-size:6pt;color:gray;'>[{$list[$i][ca_name]}]</span><span style='font-size:7pt;'>{$list[$i]['subject']}</span></a></td></tr></table>";
?>
</td>
<? } ?>
  • 복사

댓글 전체

썸네일 생성 스킨이 아닌거 같은데

$image = $list[$i][file][0][file]; //원본

$img=$data_path. "/".$image;  //썸네일이 없을경우 원본출력

if(!is_file($img)) $img="noimg.gif 경로";

해주시면 됩니당
© SIRSOFT
현재 페이지 제일 처음으로