이미지 경로 지정 도와주세요!
본문
기본 갤러리 게시판인데요 이미지를 안 올린 글은 위에 처럼 나오는게 보기싫어서요
이미지로 대체 하려구요 이미지는 만들어서 업로드 했구요 경로는 img/noimg90.png 입니다.
skin - board - galley - list.skin.php에서 아래 인거 같은데 어디를 얼마큼 지우고 어떤 소스를
어떻게 적어줘야되는지 알고 싶습니다. 소스까지 자세히 적어주세요 ㅜㅡ
} else {
$img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
}
<ul class="gall_con">
<li class="gall_href">
<a href="<?php echo $list[$i]['href'] ?>">
<?php
if ($list[$i]['is_notice']) { // 공지사항 ?>
<strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>
<?php } else {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
} else {
$img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
}
echo $img_content;
}
?>
</a>
</li>
답변 5
$img_content = "<img src=".$board_skin_url."/img/noimg90.png>";
나와야 하는데 ㅠ 이상하군요
if ( $thumb [ 'src' ]) { |
12 | $img_content = '<img src="' . $thumb [ 'src' ]. '" alt="' . $thumb [ 'alt' ]. '" width="' . $board [ 'bo_gallery_width' ]. '" height="' . $board [ 'bo_gallery_height' ]. '">' ; |
13 | } else { |
$img_content = $board_skin_url."/img/noimg90.png";
}
echo $img_content ; |
18 | } |
$img_content = '<img src=".$board_skin_url."/img/noimg90.png>';
이렇게 해야 될텐데 img 를 깜빡했네요
$img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
이 부분을
$img_content = '<img src="'.G5_IMG_URL.'/noimg90.png">';
이렇게 바꿔보세요.
그리고 no img 경로가 루트에 있는 img 폴더에 있는게 맞으시죠?
스킨 내에서 사용하시는것이기 때문에
말씀하신 이미지는 해당 게시판 스킨 /img 에 넣어주시고 제가 드린 소스를 사용해보세요