혹시 정규식씨 아시는 분 계신가요?
본문
댓글에서 에디터로 올린 이미지를 리스트에서 섬네일로 불러오는데..
<?php
if (!$list[$i]['is_notice']) {
$query = " select wr_content from ".$write_table." where wr_parent = '".$list[$i]['wr_id']."' and wr_is_comment > 0 ";
/*여러개의 글 검사 할 때*/
$result = sql_query($query);
for($j=0; $row = sql_fetch_array($result); $j++) {
echo get_view_thumbnail($row['wr_content'], $board['bo_gallery_width'], false);
}
/*여러개의 글 검사 할 때*/
//$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'].'" class="list_img">';
}
echo $img_content;
}
?>
잘나오긴 하는데 텍스트까지 출력되어 디비에서 확인해보니
cheditor에 wr_content 안에 이미지 url이 디비에 저장되는 식이더군요,,,
그래서 echo get_view_thumbnail($row['wr_content'], $board['bo_gallery_width'], false); 하면
텍스트와 이미지가 함께 출력됩니다.
이미지만 섬네일로 뽑아오려면 $row['wr_content'], 를 정규식씨로 해야 한다는거 같은데
문제는 제가 정규식씨를 본적도 없고 1도 모릅니다. 유유
도움을 기다려봅니다.