D

cheditor로 넣은 이미지 썸네이생성이 안됩니다..;;

Untitled-1.jpg
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

//썸네일 설정관련
$thumb_width = "150"; //썸네일 가로길이
$thumb_height = "200"; //썸네일 세로길이
$thumb_quality = "100"; //퀼리티 100이하로 설정

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumbphoto';

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);

$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);

// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;

// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>

// 불당썸을 include
include_once("$g4[path]/lib/thumb.lib.php");
?>

<style type="text/css">
.board_button { clear:both; margin:10px 0 0 0;}
.board_page { clear:both; text-align:center; padding:3px 0 0 0; border-top:1px solid #D8D8D8;}
.board_page a:link { color:#777;}
.board_search { text-align:center; margin:10px 0 0 0;}
.board_search .stx { height:21px; border-right:1px solid #D8D8D8; border-bottom:1px solid #D8D8D8;}
</style>
<script type="text/javascript" src="<?=$g4[path]?>/js/b4.common.js"></script>


<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="right" style="color:#6b6d70">Total : <?=number_format($total_count)?></td>
</tr>
</table>

<!-- 제목 -->
<form name="fboardlist" method="post" style="margin:0px;">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<table width="100%" cellpadding="0" cellspacing="0">
<? if ($is_category) { ?>
<tr>
<td colspan="<?=$mod?>">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="36" align="left" cellpadding="0" cellspacing="0">
<table width="100%" align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td width="75" height="36" align="center" style="padding:10 0 6 0; border-top-width:1; border-right-width:0; border-bottom-width:1; border-left-width:1; border-color:#abc2d5; border-style:solid;">
<a href='./board.php?bo_table=<?=$bo_table?>&page=<?=$page?>'><b>전체보기</b></a>
</td>
<td width='' height="36" align="left" style="padding:10 0 6 6; border-top-width:1; border-right-width:1; border-bottom-width:1; border-left-width:0; border-color:#cdd8e1; border-style:solid;">
<? {
echo "<table cellpadding='0' cellspacing='0' style='padding:0 0 0 0;'>";

$ca_menu = explode("|",$board[bo_category_list]);
$ca_td_num = "10";

for ($c=0, $cnt=count($ca_menu); $c<$cnt; $c++) {
if (($c == "0") || (($c >= $ca_td_num) && ($c % $ca_td_num == "0"))) { echo "<tr>"; }
echo "<td style='padding:2 4 2 4;'><font color=#60491B>·</font> ";

if ($sca == $ca_menu[$c]) { $bcoral = "<b style='color:coral'>"; } else { $bcoral = ""; }

$sqlCnum = " select count(*) as Cnum from $write_table where wr_is_comment = 0 and ca_name = '$ca_menu[$c]'";
$rowCnum = sql_fetch($sqlCnum);

echo "<a href='".$g4['bbs_path']."/board.php?bo_table=".$bo_table."&sca=".urlencode($ca_menu[$c])."'>";
echo $bcoral.$ca_menu[$c]."</a>";
echo "</td>";
}
echo "</tr></table>";
} ?>
</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan=<?=$colspan?> height=1></td></tr>
</table>
</td>
</tr>
<? } else { ?>
<tr><td colspan="<?=$mod?>" height="1" bgcolor="#dddddd"></td></tr>
<? } ?>

<tr align="center">
<!-- 내용 시작-->
<?
for ($i=0; $i<count($list); $i++)
{
$e_text = array("(",")"); //괄호 표시
$list[$i][comment_cnt] = str_replace($e_text, "", $list[$i][comment_cnt]); //괄호 표시 변환으로 삭제

//썸네일 생성
$thumfile = "";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
// 썸네일 이미지가 존재하지 않는다면
if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jpg|gif|png)$/i", $file) && file_exists($file)) {
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;

$rate = $thumb_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $thumb_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($thumb_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
} else { //게디터에서 삽입한 이미지 뽑자ㅠㅠ
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) { // data/cheditor------
$file = '../' . $tmp[0]; // 파일명
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;

$rate = $thumb_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $thumb_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($thumb_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
}
//이미지
if (file_exists($thumb))
$thumfile = "<img src='{$thumb}' border='0'>";
else
//이미지가 없으면
$thumfile="";
//이미지가 아니네
if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file)){
$thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$thumb_width', '$thumb_height', 'transparent'));</script>";
}

$style = "";
if ($list[$i][is_notice]) $style = " style='font-weight:bold;'";


$subject = "<span class='gray3'>".cut_str($list[$i][subject],36)."</span>";

$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:Tahoma;font-size:10px;color:#FF4326;'><strong>{$list[$i][comment_cnt]}</strong></span></a>";

echo "<td width='{$td_width}%' valign=top style='word-break:break-all;'>";
echo "<table width={$thumb_width} align='center' style='padding:0px 10px 0px 10px;'>";
echo "<tr><td height=5></td></tr>";
echo "<tr><td><div style='float:left;'><span style='font:normal 9px tahoma; color:#666666;'>{$list[$i][datetime]}</span> {$list[$i][icon_new]} {$list[$i][icon_file]} {$list[$i][icon_link]}</div>";
echo "<div style='float:right;'><span style='font:normal 9px tahoma; color:#999999;'>Hit:</span><span style='font:normal 8px tahoma; color:#777777;'><strong>{$list[$i][wr_hit]}</strong></span></div></td></tr>";
echo "<tr><td align=center width={$thumb_width} style='padding:0px 0px 5px 0px;'><div style='border:1px solid #999999; background-color:#111111; width:$thumb_width; height:$thumb_height;'><a href='{$list[$i][href]}'>$thumfile</a></div></td></tr>";
echo "<tr><td align=center><a href='{$list[$i][href]}'>$subject</a>{$comment_cnt}</td></tr>";
if ($is_category) echo "<tr><td align=center><a href='{$list[$i][ca_name_href]}'><span class=gal2s>[{$list[$i][ca_name]}]</span></a></td></tr>";
if ($is_good) echo "<tr><td align=center><img src='{$board_skin_path}/img/icon_good2.gif' title='추천' align=absmiddle><span class='oranges'><strong>{$list[$i][wr_good]}</strong></span></tr>";
if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
echo "<tr><td height=5></td></tr>";
echo "</table></td>\n";
}

// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='1'>&nbsp;</td>";
?>
<tr><td colspan="<?=$mod?>" height="1" bgcolor="#dddddd"></td></tr>
<!-- 내용 끝-->
</table>
</form>


어찌어찌해서 만들긴했는데...썸네일이미지가 안나오고 엑박도안뜨고...그냥 블랙으로나오네요..ㅠㅠ
어디가 잘못된걸까요..;;;
도움요청드립니다..ㅠㅠ

첨부파일

Untitled-1.jpg (12.5 KB)
0회 2012-03-12 23:41
|

댓글 10개

불당썸을 사용중이신것 같은데 아래와 같은 소스로 바꿔보세요.

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 불당썸을 include
include_once("$g4[path]/lib/thumb.lib.php");

//썸네일 설정관련
$thumb_width = "150"; //썸네일 가로길이
$thumb_height = "200"; //썸네일 세로길이
$thumb_quality = "90"; //퀼리티 100이하로 설정
$filter[type] = 99;
$filter[arg1] = 100;
$filter[arg2] = 1;
$filter[arg3] = 2;

$data_path = $g4[path]."/data/file/$bo_table";

$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);

// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;

// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>


?>

<style type="text/css">
.board_button { clear:both; margin:10px 0 0 0;}
.board_page { clear:both; text-align:center; padding:3px 0 0 0; border-top:1px solid #D8D8D8;}
.board_page a:link { color:#777;}
.board_search { text-align:center; margin:10px 0 0 0;}
.board_search .stx { height:21px; border-right:1px solid #D8D8D8; border-bottom:1px solid #D8D8D8;}
</style>
<script type="text/javascript" src="<?=$g4[path]?>/js/b4.common.js"></script>


<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="right" style="color:#6b6d70">Total : <?=number_format($total_count)?></td>
</tr>
</table>

<!-- 제목 -->
<form name="fboardlist" method="post" style="margin:0px;">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<table width="100%" cellpadding="0" cellspacing="0">
<? if ($is_category) { ?>
<tr>
<td colspan="<?=$mod?>">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="36" align="left" cellpadding="0" cellspacing="0">
<table width="100%" align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td width="75" height="36" align="center" style="padding:10 0 6 0; border-top-width:1; border-right-width:0; border-bottom-width:1; border-left-width:1; border-color:#abc2d5; border-style:solid;">
<a href='./board.php?bo_table=<?=$bo_table?>&page=<?=$page?>'><b>전체보기</b></a>
</td>
<td width='' height="36" align="left" style="padding:10 0 6 6; border-top-width:1; border-right-width:1; border-bottom-width:1; border-left-width:0; border-color:#cdd8e1; border-style:solid;">
<? {
echo "<table cellpadding='0' cellspacing='0' style='padding:0 0 0 0;'>";

$ca_menu = explode("|",$board[bo_category_list]);
$ca_td_num = "10";

for ($c=0, $cnt=count($ca_menu); $c<$cnt; $c++) {
if (($c == "0") || (($c >= $ca_td_num) && ($c % $ca_td_num == "0"))) { echo "<tr>"; }
echo "<td style='padding:2 4 2 4;'><font color=#60491B>·</font> ";

if ($sca == $ca_menu[$c]) { $bcoral = "<b style='color:coral'>"; } else { $bcoral = ""; }

$sqlCnum = " select count(*) as Cnum from $write_table where wr_is_comment = 0 and ca_name = '$ca_menu[$c]'";
$rowCnum = sql_fetch($sqlCnum);

echo "<a href='".$g4['bbs_path']."/board.php?bo_table=".$bo_table."&sca=".urlencode($ca_menu[$c])."'>";
echo $bcoral.$ca_menu[$c]."</a>";
echo "</td>";
}
echo "</tr></table>";
} ?>
</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan=<?=$colspan?> height=1></td></tr>
</table>
</td>
</tr>
<? } else { ?>
<tr><td colspan="<?=$mod?>" height="1" bgcolor="#dddddd"></td></tr>
<? } ?>

<tr align="center">
<!-- 내용 시작-->
<?
for ($i=0; $i<count($list); $i++)
{
$e_text = array("(",")"); //괄호 표시
$list[$i][comment_cnt] = str_replace($e_text, "", $list[$i][comment_cnt]); //괄호 표시 변환으로 삭제

//썸네일 생성
$thumfile = "";

// 썸네일 이미지가 존재하지 않는다면
if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jpg|gif|png)$/i", $file) && file_exists($file)) {
$thumb = thumbnail($file, $thumb_width, $thumb_height, 0, 1, $thumb_quality, 0, "", $filter, $noimg);
} else { //게디터에서 삽입한 이미지 뽑자ㅠㅠ
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) { // data/cheditor------
$file = '../' . $tmp[0]; // 파일명
$thumb = thumbnail($file, $thumb_width, $thumb_height, 0, 1, $thumb_quality, 0, "", $filter, $noimg);
}
}
}
//이미지
if (file_exists($thumb))
$thumfile = "<img src='{$thumb}' border='0'>";
else
//이미지가 없으면
$thumfile="";
//이미지가 아니네
if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file)){
$thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$thumb_width', '$thumb_height', 'transparent'));</script>";
}

$style = "";
if ($list[$i][is_notice]) $style = " style='font-weight:bold;'";


$subject = "<span class='gray3'>".cut_str($list[$i][subject],36)."</span>";

$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:Tahoma;font-size:10px;color:#FF4326;'><strong>{$list[$i][comment_cnt]}</strong></span></a>";

echo "<td width='{$td_width}%' valign=top style='word-break:break-all;'>";
echo "<table width={$thumb_width} align='center' style='padding:0px 10px 0px 10px;'>";
echo "<tr><td height=5></td></tr>";
echo "<tr><td><div style='float:left;'><span style='font:normal 9px tahoma; color:#666666;'>{$list[$i][datetime]}</span> {$list[$i][icon_new]} {$list[$i][icon_file]} {$list[$i][icon_link]}</div>";
echo "<div style='float:right;'><span style='font:normal 9px tahoma; color:#999999;'>Hit:</span><span style='font:normal 8px tahoma; color:#777777;'><strong>{$list[$i][wr_hit]}</strong></span></div></td></tr>";
echo "<tr><td align=center width={$thumb_width} style='padding:0px 0px 5px 0px;'><div style='border:1px solid #999999; background-color:#111111; width:$thumb_width; height:$thumb_height;'><a href='{$list[$i][href]}'>$thumfile</a></div></td></tr>";
echo "<tr><td align=center><a href='{$list[$i][href]}'>$subject</a>{$comment_cnt}</td></tr>";
if ($is_category) echo "<tr><td align=center><a href='{$list[$i][ca_name_href]}'><span class=gal2s>[{$list[$i][ca_name]}]</span></a></td></tr>";
if ($is_good) echo "<tr><td align=center><img src='{$board_skin_path}/img/icon_good2.gif' title='추천' align=absmiddle><span class='oranges'><strong>{$list[$i][wr_good]}</strong></span></tr>";
if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
echo "<tr><td height=5></td></tr>";
echo "</table></td>\n";
}

// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='1'>&nbsp;</td>";
?>
<tr><td colspan="<?=$mod?>" height="1" bgcolor="#dddddd"></td></tr>
<!-- 내용 끝-->
</table>
</form>
시하님...적용해봤는데도 안되네요..ㅠㅠ
다른문제가 있는걸까요??
어떻게 않된다는 것인가요?
링크라도 주시면 답변드릴게요.

혹시 모르니 첨부파일을 GIF가 아닌 JPG로 이미지첨부 해보세요.
http://thesensboy-ys.com/bbs/board.php?bo_table=test 테스트 주소구요..
에디터로 파일첨부하는건 아니구요...외부에서 이미지를 링크로 넣는건데요..;;
링크이미지가 썸네일 생성이 안되네요..ㅜㅡ
에구 당연히 않되지요..;;

$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) { // data/cheditor------
$file = '../' . $tmp[0]; // 파일명
이 부분이 에디터에서 첨부한 파일을 뽑아오는 정규식이 쓰였기 때문입니다.
아래의 소스로 다시해보시고 결과를 알려주세요^^.

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 불당썸을 include
include_once("$g4[path]/lib/thumb.lib.php");

//썸네일 설정관련
$thumb_width = "150"; //썸네일 가로길이
$thumb_height = "200"; //썸네일 세로길이
$thumb_quality = "90"; //퀼리티 100이하로 설정
$filter[type] = 99;
$filter[arg1] = 100;
$filter[arg2] = 1;
$filter[arg3] = 2;

$data_path = $g4[path]."/data/file/$bo_table";

$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);

// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;

// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>


?>

<style type="text/css">
.board_button { clear:both; margin:10px 0 0 0;}
.board_page { clear:both; text-align:center; padding:3px 0 0 0; border-top:1px solid #D8D8D8;}
.board_page a:link { color:#777;}
.board_search { text-align:center; margin:10px 0 0 0;}
.board_search .stx { height:21px; border-right:1px solid #D8D8D8; border-bottom:1px solid #D8D8D8;}
</style>
<script type="text/javascript" src="<?=$g4[path]?>/js/b4.common.js"></script>


<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="right" style="color:#6b6d70">Total : <?=number_format($total_count)?></td>
</tr>
</table>

<!-- 제목 -->
<form name="fboardlist" method="post" style="margin:0px;">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<table width="100%" cellpadding="0" cellspacing="0">
<? if ($is_category) { ?>
<tr>
<td colspan="<?=$mod?>">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="36" align="left" cellpadding="0" cellspacing="0">
<table width="100%" align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td width="75" height="36" align="center" style="padding:10 0 6 0; border-top-width:1; border-right-width:0; border-bottom-width:1; border-left-width:1; border-color:#abc2d5; border-style:solid;">
<a href='./board.php?bo_table=<?=$bo_table?>&page=<?=$page?>'><b>전체보기</b></a>
</td>
<td width='' height="36" align="left" style="padding:10 0 6 6; border-top-width:1; border-right-width:1; border-bottom-width:1; border-left-width:0; border-color:#cdd8e1; border-style:solid;">
<? {
echo "<table cellpadding='0' cellspacing='0' style='padding:0 0 0 0;'>";

$ca_menu = explode("|",$board[bo_category_list]);
$ca_td_num = "10";

for ($c=0, $cnt=count($ca_menu); $c<$cnt; $c++) {
if (($c == "0") || (($c >= $ca_td_num) && ($c % $ca_td_num == "0"))) { echo "<tr>"; }
echo "<td style='padding:2 4 2 4;'><font color=#60491B>·</font> ";

if ($sca == $ca_menu[$c]) { $bcoral = "<b style='color:coral'>"; } else { $bcoral = ""; }

$sqlCnum = " select count(*) as Cnum from $write_table where wr_is_comment = 0 and ca_name = '$ca_menu[$c]'";
$rowCnum = sql_fetch($sqlCnum);

echo "<a href='".$g4['bbs_path']."/board.php?bo_table=".$bo_table."&sca=".urlencode($ca_menu[$c])."'>";
echo $bcoral.$ca_menu[$c]."</a>";
echo "</td>";
}
echo "</tr></table>";
} ?>
</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan=<?=$colspan?> height=1></td></tr>
</table>
</td>
</tr>
<? } else { ?>
<tr><td colspan="<?=$mod?>" height="1" bgcolor="#dddddd"></td></tr>
<? } ?>

<tr align="center">
<!-- 내용 시작-->
<?
for ($i=0; $i<count($list); $i++)
{
$e_text = array("(",")"); //괄호 표시
$list[$i][comment_cnt] = str_replace($e_text, "", $list[$i][comment_cnt]); //괄호 표시 변환으로 삭제

//썸네일 생성
$thumfile = "";

// 썸네일 이미지가 존재하지 않는다면
if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jpg|gif|png)$/i", $file) && file_exists($file)) {
$thumb = thumbnail($file, $thumb_width, $thumb_height, 0, 1, $thumb_quality, 0, "", $filter, $noimg);
} else { //게디터에서 삽입한 이미지 뽑자ㅠㅠ
preg_match("`src\s*=([^>]+\.(gif|jp?g|png))('|\"|\s|>)`iU", $list[$i]['wr_content'], $m);
$m[1] = preg_replace("`[\s\"']+`", '', $m[1]);
$file= $m[1];
$thumb = thumbnail($file, $thumb_width, $thumb_height, 0, 1, $thumb_quality, 0, "", $filter, $noimg);
}
}
}
//이미지
if (file_exists($thumb))
$thumfile = "<img src='{$thumb}' border='0'>";
else
//이미지가 없으면
$thumfile="";
//이미지가 아니네
if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file)){
$thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$thumb_width', '$thumb_height', 'transparent'));</script>";
}

$style = "";
if ($list[$i][is_notice]) $style = " style='font-weight:bold;'";


$subject = "<span class='gray3'>".cut_str($list[$i][subject],36)."</span>";

$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:Tahoma;font-size:10px;color:#FF4326;'><strong>{$list[$i][comment_cnt]}</strong></span></a>";

echo "<td width='{$td_width}%' valign=top style='word-break:break-all;'>";
echo "<table width={$thumb_width} align='center' style='padding:0px 10px 0px 10px;'>";
echo "<tr><td height=5></td></tr>";
echo "<tr><td><div style='float:left;'><span style='font:normal 9px tahoma; color:#666666;'>{$list[$i][datetime]}</span> {$list[$i][icon_new]} {$list[$i][icon_file]} {$list[$i][icon_link]}</div>";
echo "<div style='float:right;'><span style='font:normal 9px tahoma; color:#999999;'>Hit:</span><span style='font:normal 8px tahoma; color:#777777;'><strong>{$list[$i][wr_hit]}</strong></span></div></td></tr>";
echo "<tr><td align=center width={$thumb_width} style='padding:0px 0px 5px 0px;'><div style='border:1px solid #999999; background-color:#111111; width:$thumb_width; height:$thumb_height;'><a href='{$list[$i][href]}'>$thumfile</a></div></td></tr>";
echo "<tr><td align=center><a href='{$list[$i][href]}'>$subject</a>{$comment_cnt}</td></tr>";
if ($is_category) echo "<tr><td align=center><a href='{$list[$i][ca_name_href]}'><span class=gal2s>[{$list[$i][ca_name]}]</span></a></td></tr>";
if ($is_good) echo "<tr><td align=center><img src='{$board_skin_path}/img/icon_good2.gif' title='추천' align=absmiddle><span class='oranges'><strong>{$list[$i][wr_good]}</strong></span></tr>";
if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
echo "<tr><td height=5></td></tr>";
echo "</table></td>\n";
}

// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='1'>&nbsp;</td>";
?>
<tr><td colspan="<?=$mod?>" height="1" bgcolor="#dddddd"></td></tr>
<!-- 내용 끝-->
</table>
</form>
Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /home/hosting_users/thesensboy/www/lib/thumb.lib.php on line 148

Warning: imagefttext() [function.imagefttext]: Could not find/open font in /home/hosting_users/thesensboy/www/lib/thumb.lib.php on line 153

Warning: imagegif() [function.imagegif]: Unable to open 'http://bimage.interpark.com/milti/renewPark/evtboard/thumb/150x200_noimg.gif' for writing in /home/hosting_users/thesensboy/www/lib/thumb.lib.php on line 155

오류나네요..불당썸에 문제가있는건가요??
} else { //게디터에서 삽입한 이미지 뽑자ㅠㅠ
preg_match("`src\s*=([^>]+\.(gif|jp?g|png))('|\"|\s|>)`iU", $list[$i]['wr_content'], $m);
$m[1] = preg_replace("`[\s\"']+`", '', $m[1]);
$file= $m[1];
$thumb = thumbnail($file, $thumb_width, $thumb_height, 0, 1, $thumb_quality, 0, "", $filter, $noimg);
}
}
}

여기서 맨끝에
}
요거 하나 빼주세요.
네...그건 빼서 해결됬어요..^^
근데 thumb.lib.php가 문제네요..;;
네.. 하고보니
불당썸은 원격이미지의 썸네일 생성을 못하네요.

유창화 썸네일로 바꿔야 하네요.

이건 공사가 좀 크네요..ㅠㅠ
그렇군요..^^
늦게까지 감사합니다...유창화님썸네일은 사용을 안해봐서 불당썸으로 해보려고했는데..
내일 유창화썸네일로 다시 도전해봐야겠네요..
시하님~정말 감사합니다..^^
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
13년 전 조회 2,182
13년 전 조회 1,438
13년 전 조회 2,476
13년 전 조회 1,492
13년 전 조회 1,650
13년 전 조회 1,366
13년 전 조회 2,032
13년 전 조회 1,515
13년 전 조회 6,546
13년 전 조회 2,952
13년 전 조회 1,171
13년 전 조회 1,656
13년 전 조회 1,472
13년 전 조회 1,520
13년 전 조회 1,580
13년 전 조회 2,945
13년 전 조회 1,860
13년 전 조회 1,612
13년 전 조회 1,456
13년 전 조회 1,742
🐛 버그신고