썸네일 이미지가 안나와요~!!!

· 17년 전 · 936
윈도우 xp이고 APM으로 돌리고 있습니다. GD도 설치 되어있습니다.
또 소스에 퀄리티 9로 해놓아도 최신글 썸네일 이미지가 나오지 않습니다.

<?
if (!defined("_GNUBOARD_")) exit; // 개별 ?˜ì´ì§? ?‘ê·¼ 불ê?

$cols = 1; // ?´ë?ì§? ê°?로갯??// ?´ë?ì§? ?¸ë¡œ ê°?ˆ˜??메인?ì„œ ì§???ì´??´ë?ì§? ??
$image_h = 1; // ?´ë?ì§? ?í•˜ 간격
$col_width = (int)(99 / $cols);

$img_width = 467; //?¸ë„¤??ê°?로길??
$img_height = 132; //?¸ë„¤???¸ë¡œê¸¸ì´
$img_quality = 9; //?¼ë¦¬??100?´í•˜ë¡??¤ì • ?¼ë? php버전?ì„œ??10?´í•˜???˜ë¡œ 처리 ?????ˆì‚¼

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 ?´ìƒ 버전???¤ì¹˜?˜ì–´ ?ˆì–´???¬ìš©?????ˆëŠ” 갤러ë¦?게시???…니??");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_img_list'; //?¸ë„¤???´ë?ì§? ?ì„± ?”ë ‰? ë¦¬

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

?>
<table width="467" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="18" class="Blueb" style="border-bottom-width:1; border-bottom-color:rgb(204,204,204); border-bottom-style:solid;" width="133">
<span style="font-size:8pt;"><b>Story</b></span></td>
<td width="334" height="18" style="border-bottom-width:1; border-bottom-color:rgb(204,204,204); border-bottom-style:solid;"> <p align="right"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><img src="<?=$latest_skin_path?>/img/aa.gif" width="46" height="13" border="0"></a> </tr>
<tr>
<td height="2" colspan="2"></td>
</tr>
<tr>
<td height="3" colspan="2"></td>
</tr>
</table>

<? for ($i=0; $i<count($list); $i++) { ?>
<?
$wr_content = "<a href='{$list[$i]['href']}'>".cut_str(strip_tags($list[$i]['wr_content']), 500, '...')."</a>";
// if ($i>0 && $i%$cols==0) { echo "<td colspan='$cols' height='$image_h'></td><tr>"; }
$img = "<img src='$g4_path/img/noimage.gif' border=1 width='$img_width' height='$img_height' title='?´ë?ì§? ?†ìŒ' align=left style='margin-right:5px; border:1 #FFFFF solid;'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];


// ?¬ë„¤?¼ê³¼ ?ˆë¡œ ?¬ë¦°?Œì¼ ? ì§œë¥?비교?˜ì—¬ ?ˆë„¤?¼ì„ 갱신?˜ê¸°?„í•´??ì§??´ë‹¤.
if ( file_exists($thumb) && (filemtime($thumb) < filemtime($list[$i][file][0][path] .'/'. $list[$i][file][0][file])) ) {
@unlink($thumb);
}

// ?¸ë„¤???´ë?ì§?ê°? 존재?˜ì? ?ŠëŠ”?¤ë©´
if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// ?…로?œëœ ?Œì¼???´ë?ì§??¼ë©´
//echo $i;
if (preg_match("/\.(jp[e]?g|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
break;

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

// 계산???¸ë„¤???´ë?ì§????’이ê°? ?¤ì •???´ë?ì§????’이보다 ?‘다ë©?
$dst = imagecreatetruecolor($img_width, $img_height);

if ($height < $img_height) { // 계산???´ë?ì§? ?’이ë¡?복사ë³??´ë?ì§? ?ì„±
imagecopyresampled($dst, $src, 0, 0, 0, 0, $width, $img_height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);
} else { // ?¤ì •???´ë?ì§? ?’이ë¡?복사ë³??´ë?ì§? ?ì„±
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);

}
//echo $i;
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}

if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
?>
<?
$datetime = substr($list[$i][wr_datetime],0,10);
$datetime2 = $list[$i][wr_datetime];

if ($list[$i]['wr_datetime'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($row['bo_new'] * 3600))) $comment_new = "new";

if ($datetime == $g4[time_ymd])
$datetime2 = substr($datetime2,11,5);
else
$datetime2 = substr($datetime2,5,5);

$list[$i][datetime] = $datetime;
$list[$i][datetime2] = $datetime2;

$a[$i] = array(
"wr_date"=>$datetime2,
);
?>


<?
$rw_subject = cut_str(stripslashes($list[$i][subject]),$subject_size,'..');
$a_link="<a href='{$list[$i][href]}'>$rw_subject</a>";
$a_img="<a href='{$list[$i][href]}'>$img</a>";
$a_comment="<a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i]['comment_cnt']}</span></a>";
$rw_content = cut_str(stripslashes($list[$i][wr_content]),$content_size,' ..more');
$rw_content = strip_tags($rw_content);
?>

<table width="467" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" height="116"><table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1245" valign="top">
<table width="100%" border="0" cellpadding="2" cellspacing="1">
<tr>
<td bgcolor="#FFFFFF"><?=$a_img?></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="font-weight:bold; color:black;">
 <b><span style="font-weight:bold; color:black; background-color:white;"><?
echo "<a href='{$list[$i]['href']}' class=\"b\">";
echo "{$list[$i]['subject']}";
echo "</a>";
?>
</span></b></td>
</tr>
<tr>
<td height="3"></td>
</tr>
<tr>
<td style="border-bottom-width:1; border-bottom-color:rgb(204,204,204); border-bottom-style:solid;" height="26" valign="top"> <?=$wr_content?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr><td height="10"></td>
</table>

<?
}
?>
|
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
17년 전 조회 838
17년 전 조회 768
17년 전 조회 871
17년 전 조회 1,553
17년 전 조회 847
17년 전 조회 778
17년 전 조회 754
17년 전 조회 976
17년 전 조회 1,529
17년 전 조회 937
17년 전 조회 784
17년 전 조회 833
17년 전 조회 780
17년 전 조회 735
17년 전 조회 658
17년 전 조회 1,590
17년 전 조회 1,063
17년 전 조회 1,548
17년 전 조회 832
17년 전 조회 968