갤러리최신글 스킨 질문좀드리겠습니다 > 그누4 질문답변

그누4 질문답변

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

갤러리최신글 스킨 질문좀드리겠습니다 정보

갤러리최신글 스킨 질문좀드리겠습니다

본문

Fatal error: Call to undefined function createthumb_list() in C:\KebiHome\myhome\skin\latest\jsgallery\latest.skin.php on line 79

오류내용

소스내용

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
 <tr height="2">
  <td bgcolor="#d9d9d9" colspan="3"></td>
 </tr>
 <tr>
  <td width="1" bgcolor="#d9d9d9"></td>
  <td>
  <table cellpadding="0" cellspacing="2" width="100%" bgcolor="#EFEFEF">
   <tr>
    <td bgcolor="#EFEFEF">
    <table cellpadding="5" cellspacing="0" width="100%" border="0">
     <tr height="25">
      <td style="padding-left:10;">
      <a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color="#555555"><b><?=$board[bo_subject]?></b></font></a>
      </td>
      <td align="right"><img src='<?=$latest_skin_path?>/img/icon.gif'><span style="font-size: 12px; color: #646464; font-family:dotum; letter-spacing:-1;"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'> 더 보기</a></span>  </td>
     </tr>
    </table>
    </td>
   </tr>
  </table>  
  </td>
  <td width="1" bgcolor="#d9d9d9"></td>
 </tr>
 <tr height="1">
  <td bgcolor="#d9d9d9" colspan="3"></td>
 </tr>
</table>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
    <td colspan=4 align=center style="border-left:1px #cccccc solid;border-right:1px #cccccc solid;border-bottom:1px #cccccc solid;" valign="top">
        <table  cellpadding=0 cellspacing=0 width="100%">
  <tr>
   <td height="10" colspan="<?=$mod;?>"></td>
  </tr>
        <tr>
<?
$img_width = 145; // 이미지 가로 사이즈
$img_height = 100; // 이미지 세로 사이즈

$mod = 3; // 한줄 출력개수

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

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

?>
<?
for ($i=0; $i<count($list); $i++) {
 if ($i && $i%$mod==0)
  echo "</tr><tr><td height=\"10\"></td></tr><tr>";
?>
            <td align="center" valign="top">
   <?
     if($list[$i][file][0][view]){
      $src = $list[$i][file][0][path]."/".$list[$i][file][0][file];
      $get_img = getimagesize($src); // 파일정보를 가져옴
      // 관리자가 이미지 사이즈를 바꾸었을때를 대비하여 리사이징 크기를 이름에 포함과 이미지 재 첨부시 바뀜
      $img_step1 = explode("_",$list[$i][file][0][file]);
      $img_step2 = explode(".",$img_step1[1]);
      $new_imgname = $img_step2[0];
      $thumb_file_list = "{$thumb_path}/{$re_img_width}x{$re_img_height}_{$new_imgname}_{$list[$i][wr_id]}_list";

      // gd lib 체크
      $gd = gd_info();
      $gdversion = substr(preg_replace("/[^0-9]/", "", $gd['GD Version']), 0, 2); // gd 버전이 2.0 이상인지 체크
      if(!$gdversion){
        $thumb_file_view = $src; // gd 2.0 이하면 강제적으로 줄임
      }else{
       if($img_width > $get_img[0] || $img_height > $get_img[1]){
        $thumb_file_list = $src;
       }else{
        createThumb_list($img_width,$img_height,$src, $thumb_file_list, $get_img); // list 페이지 썸네일
       }
      }
      $img = "<div style=\"border:1px #d9d9d9 solid;height:{$img_height}px;width:{$img_width}px;\"><a href='{$list[$i]['href']}'><img src=\"$thumb_file_list\" border=\"0\" width=\"$img_width\" height=\"$img_height\"/></a></div><div style=\"margin-top:3px\"><a href='{$list[$i]['href']}'>{$list[$i]['subject']}</a></div>";
     }else{
      // no 이미지를 비율적으로 만들어났음
      $img = "<div style=\"border:1px #d9d9d9 solid;height:{$img_height}px;width:{$img_width}px;\"><a href='{$list[$i]['href']}'><img src=\"$latest_skin_path/img/no_image.gif\" border=\"0\" height=\"{$img_height}\" width=\"{$img_width}\"/></a></div><div style=\"margin-top:3px\"><a href='{$list[$i]['href']}'>{$list[$i]['subject']}</a></div>";
     }
     echo $img;
   ?>
   </td>
<?}?>
<?
   // 나머지 td
   $cnt = $i%$mod;
   if ($cnt){
    for ($i=$cnt; $i<$mod; $i++)
     echo "<td height=\"$img_height\"> </td>";
   }
?>
   </tr>
  <tr>
   <td height="6" colspan="<?=$mod;?>"></td>
  </tr>
<? if (count($list) == 0) { ?><tr><td align=center height=100 valign="middle"><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
        </table></td>
</tr>


</table>


어떤문제 인지 모르겠습니다


  • 복사

댓글 전체

createthumb_list() 함수를 찾을 수 없습니다.
createthumb_list() 함수가 정의되어 있는 별도의 파일이 있을 것 같습니다.
해당 스킨 설치방법을 다시 한번 읽어보신후 관련 파일을 정상적으로 설치하셔야 하겠습니다.
혹 skin.lib.php 파일이 있나요?
네 파일있습니다
skin.lib.php  경우  업로드 경로가 skin 이 아닌다른곳입니다
lib 에 업로드 하는걸로 알고잇습니다
skin.lib.php 파일 소스입니다

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if(!function_exists('createThumb_list')){
function createThumb_list($img_width, $img_height, $imgSource, $imgThumb,$get_img) {
// 이미지체크
if($get_img[2]==1){
$img_org = imagecreatefromgif($imgSource);            //원본 이미지: gif
}else if($get_img[2]==2){
$img_org = imagecreatefromjpeg($imgSource);            //원본 이미지: jpg
}else if($get_img[2]==3){
$img_org = imagecreatefrompng($imgSource);            //원본 이미지: png
}else{
continue;
}

$target = imagecreatetruecolor($img_width,$img_height); // 리사이징 이미지 생성
Imagecopyresampled($img_org, $img_org, 0, 0, 0, 0, $img_width, $img_height, $get_img[0], $get_img[1]);  // 리사이징 temp 생성
imagecopy($target, $img_org, 0, 0, 0, 0, $img_width, $img_height); // 리사이징 temp target에 복사
imagejpeg($target,$imgThumb,100);
}
}
?>
그럼 lib폴더에 업로드 한 skin.lib.php 파일을 include 시켜야 합니다.
보통 최근 게시물을 불러오는 파일에서 include 합니다.

아래의 코드를 상단에 입력하시면 됩니다.
=========================================
include_once("$g4[path]/lib/skin.lib.php");
=========================================
<?
include_once("$g4[path]/lib/skin.lib.php");
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
 <tr height="2">
  <td bgcolor="#d9d9d9" colspan="3"></td>
 </tr>
 <tr>
  <td width="1" bgcolor="#d9d9d9"></td>
  <td>
  <table cellpadding="0" cellspacing="2" width="100%" bgcolor="#EFEFEF">
  <tr>
    <td bgcolor="#EFEFEF">
    <table cellpadding="5" cellspacing="0" width="100%" border="0">
    <tr height="25">
      <td style="padding-left:10;">
      <a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color="#555555"><b><?=$board[bo_subject]?></b></font></a>
      </td>
      <td align="right"><img src='<?=$latest_skin_path?>/img/icon.gif'><span style="font-size: 12px; color: #646464; font-family:dotum; letter-spacing:-1;"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'>&nbsp;더 보기</a></span>&nbsp;&nbsp;</td>
    </tr>
    </table>
    </td>
  </tr>
  </table> 
  </td>
  <td width="1" bgcolor="#d9d9d9"></td>
 </tr>
 <tr height="1">
  <td bgcolor="#d9d9d9" colspan="3"></td>
 </tr>
</table>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
    <td colspan=4 align=center style="border-left:1px #cccccc solid;border-right:1px #cccccc solid;border-bottom:1px #cccccc solid;" valign="top">
        <table  cellpadding=0 cellspacing=0 width="100%">
  <tr>
  <td height="10" colspan="<?=$mod;?>"></td>
  </tr>
        <tr>
<?
$img_width = 145; // 이미지 가로 사이즈
$img_height = 100; // 이미지 세로 사이즈

$mod = 3; // 한줄 출력개수

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

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

?>
<?
for ($i=0; $i<count($list); $i++) {
 if ($i && $i%$mod==0)
  echo "</tr><tr><td height=\"10\"></td></tr><tr>";
?>
            <td align="center" valign="top">
  <?
    if($list[$i][file][0][view]){
      $src = $list[$i][file][0][path]."/".$list[$i][file][0][file];
      $get_img = getimagesize($src); // 파일정보를 가져옴
      // 관리자가 이미지 사이즈를 바꾸었을때를 대비하여 리사이징 크기를 이름에 포함과 이미지 재 첨부시 바뀜
      $img_step1 = explode("_",$list[$i][file][0][file]);
      $img_step2 = explode(".",$img_step1[1]);
      $new_imgname = $img_step2[0];
      $thumb_file_list = "{$thumb_path}/{$re_img_width}x{$re_img_height}_{$new_imgname}_{$list[$i][wr_id]}_list";

      // gd lib 체크
      $gd = gd_info();
      $gdversion = substr(preg_replace("/[^0-9]/", "", $gd['GD Version']), 0, 2); // gd 버전이 2.0 이상인지 체크
      if(!$gdversion){
        $thumb_file_view = $src; // gd 2.0 이하면 강제적으로 줄임
      }else{
      if($img_width > $get_img[0] || $img_height > $get_img[1]){
        $thumb_file_list = $src;
      }else{
        createThumb_list($img_width,$img_height,$src, $thumb_file_list, $get_img); // list 페이지 썸네일
      }
      }
      $img = "<div style=\"border:1px #d9d9d9 solid;height:{$img_height}px;width:{$img_width}px;\"><a href='{$list[$i]['href']}'><img src=\"$thumb_file_list\" border=\"0\" width=\"$img_width\" height=\"$img_height\"/></a></div><div style=\"margin-top:3px\"><a href='{$list[$i]['href']}'>{$list[$i]['subject']}</a></div>";
    }else{
      // no 이미지를 비율적으로 만들어났음
      $img = "<div style=\"border:1px #d9d9d9 solid;height:{$img_height}px;width:{$img_width}px;\"><a href='{$list[$i]['href']}'><img src=\"$latest_skin_path/img/no_image.gif\" border=\"0\" height=\"{$img_height}\" width=\"{$img_width}\"/></a></div><div style=\"margin-top:3px\"><a href='{$list[$i]['href']}'>{$list[$i]['subject']}</a></div>";
    }
    echo $img;
  ?>
  </td>
<?}?>
<?
  // 나머지 td
  $cnt = $i%$mod;
  if ($cnt){
    for ($i=$cnt; $i<$mod; $i++)
    echo "<td height=\"$img_height\">&nbsp;</td>";
  }
?>
  </tr>
  <tr>
  <td height="6" colspan="<?=$mod;?>"></td>
  </tr>
<? if (count($list) == 0) { ?><tr><td align=center height=100 valign="middle"><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
        </table></td>
</tr>


</table>


이런식으로 해보세요~
수고요
© SIRSOFT
현재 페이지 제일 처음으로