채택완료

이미지 경로 지정 도와주세요!

c31fe25c7f4cd4164f913243d4259b72_1406910980_9256.png
 

기본 ​갤러리  게시판인데요 이미지를 안 올린 글은 위에 처럼 나오는게 보기싫어서요  

이미지로 대체 하려구요 이미지는 만들어서 업로드 했구요 경로는 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>';

                        } 


Copy
​<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개 / 댓글 4개

채택된 답변
+20 포인트

$img_content​ = "<img src=".$board_skin_url."/img/noimg90.png>"; 

나와야 하는데 ㅠ 이상하군요

답변에 대한 댓글 1개

레스트님 제가 경로 실수를 했었네요 ~ 성공했습니다!!!
계속 답변 주셔서 너무나 감사드립니다! 꾸벅(__

스킨 내에서 사용하시는것이기 때문에 

말씀하신 이미지는 해당 게시판 스킨 /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 폴더에 있는게 맞으시죠?

답변에 대한 댓글 1개

제 실수로 안되는 거였습니다 흑흑 답변 주셔서 감사합니다.

$img_content​ = '<img src=".$board_skin_url."/img/noimg90.png​>'; 

이렇게 해야 될텐데 img 를 깜빡했네요

답변에 대한 댓글 1개

빠른답변 감사드립니다! 이번에도 안나오네요 흑흑 ㅜㅡ

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                    }

 

답변에 대한 댓글 1개

답변감사합니다. 말씀해주신대로
$img_content​ = $board_skin_url."/img/noimg90.png​"; 넣었는데 이미지는 안나오고 홈페이지에
http://아이디.cafe24.com/skin/board/galleryimg/noimg90.png 나옵니다 ㅜㅡ 이미지는 최상단 img 폴더에다 넣었습니다

답변을 작성하려면 로그인이 필요합니다.