최신글을 불러올때 사진이 있는경우...
본문
최신글을 불러올때 사진을 가져올때
첨부파일로 등록된 사진이랑 에디터로 등록된 사진을 둘다 가져오려면 어떻게하나요..?
g5_board_file 에서 가져오니까 첨부파일로 등록된 사진만 불러와지네요 ㅠ ㅠ
답변 1
<?php
for ($i=0; $i<count($list); $i++) {
echo "<li>";
echo "<a href='{$list[$i]['href']}'>";
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height);
if($thumb['src']) {
$img = '<img src="'.$thumb['src'].'" width="'.$thumb_width.'" height="'.$thumb_height.'" class="latest_img" title="'.$list[$i]['subject'].'" >';
} else {
$img = '<img src="'.$latest_skin_url.'/img/noimage.png" width="'.$thumb_width.'" height="'.$thumb_height.'" title="'.$list[$i]['subject'].'">';
}
echo $img;
echo "</a>";
echo "</li>";
} ?>
답변을 작성하시기 전에 로그인 해주세요.