재경아빠님 ucc스킨 질문있어요. 정보
재경아빠님 ucc스킨 질문있어요.첨부파일
본문
동영상 파일을 전부 올리는게 아니구 때로는 이미지만 올려서 쓰려고 하는데
테스트로 첨부파일에 이미지 하나 올려서 글을 하나 입력해보니
이미지가 안뜨고 에러가 뜨네요..;;
Fatal error: Call to undefined function: maker2() in /home/hosting_users/tvrama/www/gbbs/skin/board/pb_ucc/list.skin.php on line 92
list.skin.php의 92번째줄은....
<? for ($i=0; $i<count($list); $i++) { // Thumbnail
$title = "클릭하시면 해당 상세페이지로 이동합니다.";
$content = cut_str(get_text($list[$i][wr_content]), 80);
$title = "클릭하시면 해당 상세페이지로 이동합니다.";
$content = cut_str(get_text($list[$i][wr_content]), 80);
// ===== UCC 업로드 이미지 프리뷰!! //
$thum=$list[$i][wr_9];
$_time="";
if ($thum!="") {
$thum = "../ucc/flv_data/".$thum.".jpg";
$min=intval($list[$i][wr_8]/60)."분";
$sec=($list[$i][wr_8]%60)."초";
if ($list[$i][wr_8]/60>=1) {$_time="($min$sec)";}else{$_time="($sec)";}
}
// ===== UCC 업로드 이미지 프리뷰!! //
$thum=$list[$i][wr_9];
$_time="";
if ($thum!="") {
$thum = "../ucc/flv_data/".$thum.".jpg";
$min=intval($list[$i][wr_8]/60)."분";
$sec=($list[$i][wr_8]%60)."초";
if ($list[$i][wr_8]/60>=1) {$_time="($min$sec)";}else{$_time="($sec)";}
}
// ===== UCC 업로드 이미지 프리뷰!! //
if (!file_exists($thum)) // thumb 이미지 여부
{
{
$image = urlencode($list[$i][file][0][file]);
$ori="$g4[path]/data/file/$bo_table/" . $image;
$ext = strtolower(substr(strrchr($ori,"."), 1)); //확장자
if ( $ext=="gif"||$ext=="jpg"||$ext=="jpeg"||$ext=="png"||$ext=="bmp"||$ext=="tif"||$ext=="tiff") $ori_info=getimagesize($ori); else $ori_info="";
if ( $ori_info[2]=="2" || $ori_info[2]=="3" ) { //원파일이 [ 2JPG, 2JPEG, 3PNG ] 경우.
$thum = $ori.".Thum" ;
if ( file_exists($thum) ) { // Thumbnail [O] 경우
$thum_info = getimagesize ($thum);
$thum_W = $thum_info[0] ;
$thum_H = $thum_info[1] ;
} else { // Thumbnail [X] 경우
if ( smaller( $ori_info[0], $ori_info[1] ) ) {
maker2( $thum_W, $thum_H ); <<<<<------------------------------------------------ 92번째줄
}
}
} else if ( $ori_info[2]=="1" || $ori_info[2]=="6" || $ori_info[2]=="7" ) { //원파일이 [ 1GIF,6BMP,7TIF ] 경우.
if ( smaller( $ori_info[0], $ori_info[1] ) ) {
$thum = $ori ;
}
} else { //원파일이 [ 1,2,3,6,7 ] 아닐 경우.
$thum = $noIMG ;
}
}
$view_href = "<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>";
$checkbox = "";
if ($is_checkbox)
$checkbox = "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";
if ($is_checkbox)
$checkbox = "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";
$tr = "";
if ($i && $i%$board[bo_gallery_cols]==0)
$tr = "</tr><tr>";
echo "$tr";
if ($i && $i%$board[bo_gallery_cols]==0)
$tr = "</tr><tr>";
echo "$tr";
//echo <<<HEREDOC
echo "<td width='{$td_width}%' valign='top' align='center'>";
echo "<td width='{$td_width}%' valign='top' align='center'>";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>";
echo "<tr>";
echo "<td width=112 style='padding:6 6 6 6;'>{$view_href}<img src='{$thum}' alt='동영상보기' width='100' border=0></a></td>";
echo "<td style='padding:3 5 0 5;'>{$checkbox} {$view_href}<font color=000000><b>EP {$list[$i][subject]}</b></font><br><img src={$board_skin_path}/img/non.gif border=0><br><font color=black>";
echo "<tr>";
echo "<td width=112 style='padding:6 6 6 6;'>{$view_href}<img src='{$thum}' alt='동영상보기' width='100' border=0></a></td>";
echo "<td style='padding:3 5 0 5;'>{$checkbox} {$view_href}<font color=000000><b>EP {$list[$i][subject]}</b></font><br><img src={$board_skin_path}/img/non.gif border=0><br><font color=black>";
echo cut_str($list[$i][wr_content],110,'...');
echo "</a></font></td>";
echo "<td width=100 align=right style='padding:0 5 0 0;'><font class=dta7>view {$list[$i][wr_hit]}</font></td>";
echo "</tr>";
echo "<tr><td colspan='3' height=1 bgcolor=B7B7B2></td></tr>";
echo "</table>";
echo "<td width=100 align=right style='padding:0 5 0 0;'><font class=dta7>view {$list[$i][wr_hit]}</font></td>";
echo "</tr>";
echo "<tr><td colspan='3' height=1 bgcolor=B7B7B2></td></tr>";
echo "</table>";
echo "</td>";
//HEREDOC;
}
//HEREDOC;
}
// 나머지 td 를 채운다.
if (($cnt = $i%$board[bo_gallery_cols]) != 0)
for ($k=$cnt; $k<$board[bo_gallery_cols]; $k++)
echo "<td> </td>\n";
for ($k=$cnt; $k<$board[bo_gallery_cols]; $k++)
echo "<td> </td>\n";
if ($i == 0)
echo "<td colspan='$board[bo_gallery_cols]' height=50 align=center>게시물이 없습니다.</td>";
?>
echo "<td colspan='$board[bo_gallery_cols]' height=50 align=center>게시물이 없습니다.</td>";
?>
위에 표시한 부분입니다.
동영상이 없이 이미지만 올렸을 경우 이미지가 안뜨는데;
이를 출력하려면 어떻게 해야 할까요?;;
파일 내용도 많고 해서 파일 몇개 첨부해서 올립니다
댓글 전체
list 스킨 상단에 원래있던 내용이 빠져 있습니다.
아래 내용을 복사해 넣으시면 되겠습니다.
<?
if (!defined("_GNUBOARD_")) exit;
$noIMG = $board_skin_path."/img/noimg.gif"; //[필수](URL)
$max = 120 ; //[필수](픽셀) 썸네일 이미지의 가로세로(긴쪽)의 최대치.
$resol = 90 ; //[필수](퍼센트%) 생성되는 썸네일의 JPG압축률.
function smaller( $W, $H ) {
global $max, $thum_W, $thum_H ;
if ( $W > $H ) { //가로형일 경우.
$thum_W = $max ;
$thum_H = ceil( $H * ( $max / $W ) );
}
if ( $W < $H ) { //세로형일 경우.
$thum_H = $max ;
$thum_W = ceil( $W * ( $max / $H ) );
}
if ( $W == $H ) { //정사각형일 경우.
$thum_W = ceil( $max * 0.8 );
$thum_H = ceil( $max * 0.8 );
}
return $thum_W ;
return $thum_H ;
}
function maker2( $thum_W, $thum_H ) {
global $thum, $resol, $ori, $ori_info ;
//$newImg = ImageCreate($thum_W,$thum_H); // GD라이브러리 2.0 (이하일 경우)
$newImg = ImageCreateTrueColor($thum_W,$thum_H); // GD라이브러리 2.0 전용함수
if($ori_info[2]=="2") $origImg=ImageCreateFromjpeg($ori);
if($ori_info[2]=="3") $origImg=ImageCreateFrompng($ori);
//ImageCopyResized($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
imageCopyResampled($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
Imagejpeg($newImg, $thum, $resol );
chmod($thum,0707);
ImageDestroy($newImg);
ImageDestroy($origImg);
return $thum ;
}
?>
아래 내용을 복사해 넣으시면 되겠습니다.
<?
if (!defined("_GNUBOARD_")) exit;
$noIMG = $board_skin_path."/img/noimg.gif"; //[필수](URL)
$max = 120 ; //[필수](픽셀) 썸네일 이미지의 가로세로(긴쪽)의 최대치.
$resol = 90 ; //[필수](퍼센트%) 생성되는 썸네일의 JPG압축률.
function smaller( $W, $H ) {
global $max, $thum_W, $thum_H ;
if ( $W > $H ) { //가로형일 경우.
$thum_W = $max ;
$thum_H = ceil( $H * ( $max / $W ) );
}
if ( $W < $H ) { //세로형일 경우.
$thum_H = $max ;
$thum_W = ceil( $W * ( $max / $H ) );
}
if ( $W == $H ) { //정사각형일 경우.
$thum_W = ceil( $max * 0.8 );
$thum_H = ceil( $max * 0.8 );
}
return $thum_W ;
return $thum_H ;
}
function maker2( $thum_W, $thum_H ) {
global $thum, $resol, $ori, $ori_info ;
//$newImg = ImageCreate($thum_W,$thum_H); // GD라이브러리 2.0 (이하일 경우)
$newImg = ImageCreateTrueColor($thum_W,$thum_H); // GD라이브러리 2.0 전용함수
if($ori_info[2]=="2") $origImg=ImageCreateFromjpeg($ori);
if($ori_info[2]=="3") $origImg=ImageCreateFrompng($ori);
//ImageCopyResized($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
imageCopyResampled($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
Imagejpeg($newImg, $thum, $resol );
chmod($thum,0707);
ImageDestroy($newImg);
ImageDestroy($origImg);
return $thum ;
}
?>
항상 많은도움을 주셔서 감사합니다.
덕분에 잘 해결되었습니다.
덕분에 잘 해결되었습니다.