다중 첨부이미지 관련 문의
본문
갤러리 게시판 리스트에서 2개 보여주고 싶습니다. 한 게시물에서 말이죠.
-----------G5 갤러리 게시판에서 썸네일을 보여주는 부분은 아래와 같습니다.
$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;
여기에서 어디를 수정해야 하는지... 당췌 알수가 없습니다. ㅠㅠ
참고로 G4 버전에서는
$img2 = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][1][file]);
를 삽입하고
echo "<img src=\"{$img2}\" width='{$img_width}' height='{$img_height}' border=\"0\">";
라고 작성해 주었더니 두번째 이미지가 보였습니다.
어디를 어떻게 고쳐야 하는지 알려주시면 너무 너무 감사하겠습니다.
답변 1
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
$img2 = "$g5[path]/data/file/$bo_table/".urlencode($list[$i][file][1][file]);
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;
echo "<img src=\"{$img2}\" width='{$img_width}' height='{$img_height}' border=\"0\">";
작성하셨던 위 소스를 이렇게 바꾸니 일단 나오기는 합니다..
문제가 없는지 모르겠네요;;