아래 소스를 추가 하고 싶은데.. 채택완료
외부 이미지 썸네일을 목록에서 보여주고 싶은데 잘 안되네요
아래 소스 좀 봐 주실래요.
외부 썸네일 소스를 추가한 것입니다.
</strong></p>
<p> <?php } else {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], false, true);</p>
<p> if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" >';
}</p>
<p> // 외부 이미지 썸네일 만들기 {
} else if($url_img = get_editor_image($list[$i]['wr_content'])){
$img_src = $url_img[1][0];
preg_match("/src=[\'\"]?([^>\'\"]+[^>\'\"]+)/i", $img_src, $m);
$src = htmlspecialchars_decode($m[1]);
preg_match("/alt=[\"\']?([^\"\']*)[\"\']?/", $img_src, $m);
$alt = get_text($m[1]);
$filename = hash("sha256", $src);
$source_path = $target_path = G5_DATA_PATH.'/file/'.$board['bo_table'];
$file_download = $target_path."/".$filename;
if (!file_exists($file_download)) {
copy($src, $file_download);
}
$thumb_src = thumbnail($filename, $source_path, $target_path, $board['bo_gallery_width'], $board['bo_gallery_height'], false, true);
$img_content = '<img src="'.G5_DATA_URL.'/file/'.$board['bo_table'].'/'.$thumb_src.'" alt="'.$alt.'" >';
// } 외부 이미지 썸네일 만들기</p>
<p> echo $img_content;
}
?></p>
<p><strong>
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인