최신글에서 썸네일이 없을 경우 엣박 없이 다른 그림으로 대체법?
아래 최신글 스킨에서
게시판에 등록된 이미지가 없이(그러므로 썸네일도 없을 경우) 엣박이 나오지 않도록 다른 그림으로 대체하는 방법이 있을까요?
고수님들께 문의 드립니다.
<?
$image = $list[$i][file][0][file]; //원본 리사이즈_아래 자바와 연동_추가
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
$image = $list[$i][file][0][file]; //원본 리사이즈_아래 자바와 연동_추가
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
if ( file_exists($thumb) )
$img = $thumb;
$style_a = "font-family:돋움; font-size:9pt; color:#999999;";
$img = $thumb;
$style_a = "font-family:돋움; font-size:9pt; color:#999999;";
$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],17)."</span>"; //제목 글자수 자르기
// $subject = "<span $style>". $list[$i][subject]. "</span>";
if ($list[$i][icon_new])
$style = "style='font-family:돋움; font-size:9pt; color:#006F00;' ";
$subject = "<span $style>".cut_str($list[$i][subject],17)."</span>"; //제목 글자수 자르기
// $subject = "<span $style>". $list[$i][subject]. "</span>";
$wr_content = "<a href='{$list[$i][href]}' onfocus='this.blur()'><span $style_a>".Shorten_String(strip_tags($list[$i][wr_content]), 40, ' ...')."</span></a>";
?>
<? echo "<a href='{$list[$i][href]}' onfocus='this.blur()'><img src='$img' width='$img_w' height='$img_h' border='0'></a>"; ?> </div></td>
?>
<? echo "<a href='{$list[$i][href]}' onfocus='this.blur()'><img src='$img' width='$img_w' height='$img_h' border='0'></a>"; ?> </div></td>
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 2개
키 워 드 : no_image
검색옵션 : 제목+내용, and
관련 게시판 : g4질답, 팁게시판, 스킨자료실
찾아보시면 겁나게 많이 있습니다.