아래와 같은 불당썸 최신글 소스를 사용하고 있습니다.
최신글을 불러올때는 문제가 없는데
최신글이 없을때 <img src='$g4[path]/images/no_img.jpg'> 식으로 했을때 그렇네요.
"Require content"라는 텍스트가 이미지 옆에 나타나네요.
이유가 뭔지 알려주시면 감사드리겠습니다.^^
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$is_crop = 1;
// $is_crop : 세로 높이가 $height를 넘을 때 crop 할 것인지를 결정
// 0 : crop 하지 않습니다
// 1 : 기본 crop
// 2 : 중간을 기준으로 crop
//불당썸---------------------------------------------------------------//
$img_width = 650; //표시할 이미지의 가로사이즈
$img_height = 450; //표시할 이미지의 세로사이즈
//언샾마스트 퀄리티(썸 노이즈바지)
$filter[type] = 99;
$filter[arg1] = 100;
$filter[arg2] = 1;
$filter[arg3] = 2;
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$no_img = $latest_skin_path."/img/no_img.jpg";
// 불당썸을 include
include_once("$g4[path]/lib/thumb.lib.php");
//불당썸---------------------------------------------------------------//
//$list_content = "450"; //내용길이
$cols = 6;
?>
<div>
<ul>
<? for ($i=0; $i<count($list); $i++) { ?>
<?
//썸네일 생성
$thumfile = "";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $file) && file_exists($file)) {
$thumb = thumbnail($file, $img_width, $img_height, 0, 1, 90, 0, "", $filter, $noimg); //첨부파일 언샾마스크추가
}
else {
//에디터에서 삽입한 이미지
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) {
// data/cheditor------
$file = $g4[path].'/' . $tmp[0]; // 파일명
$thumb=thumbnail($file, $img_width, $img_height, 0, $is_crop, 90, 0, "", $filter, $noimg); //언샾마스크추가
}
}
if ($i>0 && $i%$cols==0) {
//echo "<tr><td colspan='$cols'></td><tr>";
}
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $thumb) && file_exists($thumb)) {
echo "<li>";
echo "<a href='{$list[$i]['href']}'>";
echo "<img src='$thumb' border='0'>";
echo "</a>";
echo "</li>";
}
}
?>
<? if (count($list) == 0) { echo "<img src='$g4[path]/images/no_img.jpg'>"; } ?>
</ul>
최신글을 불러올때는 문제가 없는데
최신글이 없을때 <img src='$g4[path]/images/no_img.jpg'> 식으로 했을때 그렇네요.
"Require content"라는 텍스트가 이미지 옆에 나타나네요.
이유가 뭔지 알려주시면 감사드리겠습니다.^^
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$is_crop = 1;
// $is_crop : 세로 높이가 $height를 넘을 때 crop 할 것인지를 결정
// 0 : crop 하지 않습니다
// 1 : 기본 crop
// 2 : 중간을 기준으로 crop
//불당썸---------------------------------------------------------------//
$img_width = 650; //표시할 이미지의 가로사이즈
$img_height = 450; //표시할 이미지의 세로사이즈
//언샾마스트 퀄리티(썸 노이즈바지)
$filter[type] = 99;
$filter[arg1] = 100;
$filter[arg2] = 1;
$filter[arg3] = 2;
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$no_img = $latest_skin_path."/img/no_img.jpg";
// 불당썸을 include
include_once("$g4[path]/lib/thumb.lib.php");
//불당썸---------------------------------------------------------------//
//$list_content = "450"; //내용길이
$cols = 6;
?>
<div>
<ul>
<? for ($i=0; $i<count($list); $i++) { ?>
<?
//썸네일 생성
$thumfile = "";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $file) && file_exists($file)) {
$thumb = thumbnail($file, $img_width, $img_height, 0, 1, 90, 0, "", $filter, $noimg); //첨부파일 언샾마스크추가
}
else {
//에디터에서 삽입한 이미지
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) {
// data/cheditor------
$file = $g4[path].'/' . $tmp[0]; // 파일명
$thumb=thumbnail($file, $img_width, $img_height, 0, $is_crop, 90, 0, "", $filter, $noimg); //언샾마스크추가
}
}
if ($i>0 && $i%$cols==0) {
//echo "<tr><td colspan='$cols'></td><tr>";
}
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $thumb) && file_exists($thumb)) {
echo "<li>";
echo "<a href='{$list[$i]['href']}'>";
echo "<img src='$thumb' border='0'>";
echo "</a>";
echo "</li>";
}
}
?>
<? if (count($list) == 0) { echo "<img src='$g4[path]/images/no_img.jpg'>"; } ?>
</ul>
댓글 1개
게시글 목록
| 번호 | 제목 |
|---|---|
| 284348 | |
| 284336 | |
| 284333 | |
| 284332 | |
| 284320 | |
| 284318 | |
| 284316 | |
| 284313 | |
| 284307 | |
| 284306 | |
| 284303 | |
| 284298 | |
| 284296 | |
| 284290 | |
| 284286 | |
| 284280 | |
| 284277 | |
| 284272 | |
| 284261 | |
| 284259 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기