테스트 사이트 - 개발 중인 베타 버전입니다

스킨이 적용이 안되요 ㅠㅠ 채택완료

먼저 그림으로 봐주세요. 

무엇을 고쳐야 되는지 모르겠습니다. 저는 초짜라서 잘 모르겠습니다.

 

저희 홈페이지 주소입니다 http://jhil.iptime.org:8000/jyil/">http://jhil.iptime.org:8000/jyil/

 

고수님들 부탁드립니다.

그누보드5 씁니다.

 

스킨에 소스 코드입니다.

우선 latest.skin

 

$img_width = 130; // 이미지 가로 사이즈 $img_height = 100; // 이미지 세로 사이즈 $mod = 3; // 한줄 출력개수

$data_path = G4_DATA_PATH."/file/$bo_table"; $thumb_path1 = $data_path.'/latest_thumb'; $thumb_path = G4_DATA_URL."/file/$bo_table/latest_thumb";  //이미지를 불러올때필요 ?>

 

 
      
  • 전체보기
  •  
 
  • >    ';       //                  } else {         //                    $img_content = 'no image';           //              }    /////////////     $file = get_list_file($bo_table, $list[$i]['wr_id']);

                           $filepath = G4_DATA_PATH.'/file/'.$bo_table;                   if($list[$i][file][0][view]){                             $thumb = get_list_thumbnail($file['bf_file'], $filepath, $img_width,$img_height);        //echo "몰라".$list[$i]['wr_id']."우짜라고";                        //     $thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $img_width,$img_height);         $imgsrc = G4_DATA_URL.'/file/'.$bo_table.'/'.$thumb;                        $img_content = ''.$file['bf_content'].'';     $img_content ="$img_content {$list[$i]['subject']}";              } else {                  $img_content = "{$list[$i]['subject']}";                         }

                            echo $img_content;         ?>    

  • 게시물이 없습니다.
  •  

 

두번째

thumbnail 소스입니다.

 

@ini_set('memory_limit', '512M'); //펑션이름 앞에 kobi_ 붙어 있는 것은 최신글 갤러리에서는 사용하지 않는거 같음... 분석끝나면 삭제해도 될듯.. function kobi_it_img_thumb($filename, $filepath, $thumb_width, $thumb_height, $is_create=false) {     return thumbnail($filename, $filepath, $filepath, $thumb_width, $thumb_height, $is_create); }

// 게시글리스트 썸네일 생성 function get_list_thumbnail($filename, $filepath, $thumb_width, $thumb_height, $is_create=false, $is_crop=true) {     return thumbnail($filename, $filepath, $filepath, $thumb_width, $thumb_height, $is_create, $is_crop); }

// 게시글보기 썸네일 생성 function kobi_get_view_thumbnail($contents) {     global $board, $config;     $dvc_width = intval($_COOKIE['device_width']);

    if(G4_IS_MOBILE && $dvc_width) {         // 썸네일 width 설정         $thumb_width = 320;

        if($dvc_width >= 1000) {             return $contents;         } else if($dvc_width >= 760 && $dvc_width < 1000) {             $thumb_width = 760;         } else if($dvc_width >= 480 && $dvc_width < 760) {             $thumb_width = 480;         }     } else {         $thumb_width = $board['bo_image_width'];     }

    // $contents 중 img 태그 추출     $matchs = get_editor_image($contents);

    if(!$matchs)         return $contents;

    for($i=0; $i

        if(is_file($srcfile)) {             // 썸네일 높이             $size = @getimagesize($srcfile);             if(empty($size))                 continue;

            // 원본 width가 thumb_width보다 작다면             if($size[0] <= $thumb_width)                 continue;

            // Animated GIF 체크             $is_animated = false;             if($size[2] == 1) {                 $is_animated = is_animated_gif($srcfile);             }

            $thumb_height = round(($thumb_width * $size[1]) / $size[0]);             $filename = basename($srcfile);             $filepath = dirname($srcfile);

            // 썸네일 생성             if(!$is_animated)                 $thumb_file = thumbnail($filename, $filepath, $filepath, $thumb_width, $thumb_height, false);             else                 $thumb_file = $filename;

            $img_tag = $matchs[0][$i];             $thumb_tag = str_replace($filename, $thumb_file, $img_tag);

            // img 태그에 width 값이 있을 경우 width 값 바꿔줌             preg_match("/width=[\'\"]?([0-9]+)[\'\"]?/", $img_tag, $mw);             if(!empty($mw[1])) {                 $thumb_tag = str_replace($mw[0], str_replace($mw[1], $thumb_width, $mw[0]), $thumb_tag);             }

            // img 태그에 height 값이 있을 경우 height 값 바꿔줌             preg_match("/height=[\'\"]?([0-9]+)[\'\"]?/", $img_tag, $mh);             if(!empty($mh[1])) {                 $thumb_tag = str_replace($mh[0], str_replace($mh[1], $thumb_height, $mh[0]), $thumb_tag);             }

            // $img_tag에 editor 경로가 있으면 원본보기 링크 추가             if(strpos($matchs[1][$i], 'data/editor') && preg_match("/\.({$config['cf_image_extension']})$/i", $filename)) {                 $thumb_tag = ''.$thumb_tag.'';             }

            $contents = str_replace($img_tag, $thumb_tag, $contents);         }     }

    return $contents; }

//function thumbnail($bo_table, $file, $width, $height, $is_create=false) function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_height, $is_create, $is_crop=false) {     global $g4;

    if ($thumb_width==0 || $thumb_height==0) return;

    $thumb_filename = preg_replace("/\.[^\.]+$/i", "", $filename); // 확장자제거

    if (!is_dir($target_path)) {         @mkdir($target_path, 0707);         @chmod($target_path, 0707);     }

    $thumb_file = "$target_path/thumb-{$thumb_filename}_{$thumb_width}x{$thumb_height}.jpg";     $thumb_time = @filemtime($thumb_file);     $source_file = "$source_path/$filename";     $source_time = @filemtime($source_file);     if (file_exists($thumb_file)) {         if ($is_create == false && $source_time < $thumb_time) {             return basename($thumb_file);         }     }

    $size = @getimagesize($source_file);     // 이미지 파일이 없거나 아님     if (!$size[0]) {         if (!$thumb_height) $thumb_height = $thumb_width;         $thumb_file = "$target_path/thumb-noimg_{$thumb_width}x{$thumb_height}.jpg";         if (!file_exists($thumb_file)) {             $target = imagecreate($thumb_width, $thumb_height);             imagecolorallocate($target, 250, 250, 250);             imagecopy($target, $target, 0, 0, 0, 0, $thumb_width, $thumb_height);             imagejpeg($target, $thumb_file, 90);             @chmod($thumb_file, 0606); // 추후 삭제를 위하여 파일모드 변경         }         return basename($thumb_file);     }

    // Animated GIF 체크     if($size[2] == 1) {         if(is_animated_gif($source_file))             return basename($source_file);     }

    $is_imagecopyresampled = false;     $is_large = false;

    $src = null;     if ($size[2] == 1) {         $src = imagecreatefromgif($source_file);     } else if ($size[2] == 2) {         $src = imagecreatefromjpeg($source_file);     } else if ($size[2] == 3) {         $src = imagecreatefrompng($source_file);     }

    $src_width = $size[0];     $src_height = $size[1];

    if($is_crop && $thumb_width && $thumb_height) {         $ratio = $thumb_height / $thumb_width;         if($src_height / $src_width >= $ratio) {             $src_height = ceil(($thumb_height * $src_width) / $thumb_width);         } else {             $src_width = ceil(($thumb_width * $src_height) / $thumb_height);         }     }

    if ($thumb_width) {         if ($thumb_height) {             $rate = $thumb_width / $src_width;             $tmp_height = (int)($src_height * $rate);             if ($tmp_height < $thumb_height) {                 $dst = imagecreatetruecolor($thumb_width, $thumb_height);                 $bgcolor = imagecolorallocate($dst, 250, 250, 250); // 배경색 여기야!!!                 imagefill($dst, 0, 0, $bgcolor);                 imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $thumb_height, $src_width, $src_height);             } else {                 $dst = imagecreatetruecolor($thumb_width, $thumb_height);                 imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $thumb_height, $src_width, $src_height);             }         } else {             $rate = $thumb_width / $src_width;             $tmp_height = (int)($src_height * $rate);             $dst = imagecreatetruecolor($thumb_width, $tmp_height);             imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $tmp_height, $src_width, $src_height);         }     }

    //imagepng($dst, $thumb_file, 9); // 0 (no compression) ~ 9     imagejpeg($dst, $thumb_file, 90);     chmod($thumb_file, 0606); // 추후 삭제를 위하여 파일모드 변경

    return basename($thumb_file); }

function is_animated_gif($filename) {     if(!($fh = @fopen($filename, 'rb')))         return false;     $count = 0;     // 출처 : http://www.php.net/manual/en/function.imagecreatefromgif.php#104473">http://www.php.net/manual/en/function.imagecreatefromgif.php#104473     // an animated gif contains multiple "frames", with each frame having a     // header made up of:     // * a static 4-byte sequence (\x00\x21\xF9\x04)     // * 4 variable bytes     // * a static 2-byte sequence (\x00\x2C) (some variants may use \x00\x21 ?)

    // We read through the file til we reach the end of the file, or we've found     // at least 2 frame headers     while(!feof($fh) && $count < 2) {         $chunk = fread($fh, 1024 * 100); //read 100kb at a time         $count += preg_match_all('#\x00\x21\xF9\x04.{4}\x00(\x2C|\x21)#s', $chunk, $matches);    }

    fclose($fh);     return $count > 1; } ?>

 

세번째 스타일 입니다

 

.latestList {position:relative; margin-bottom:15px; padding-bottom:15px; border-bottom:1px solid #ddd; font-size:12px; } .latestList * {margin:0; padding:0; border:none;} .latestList h2 {margin-bottom:5px; padding:8px; font-size:12px; color:#222;} .latestList h2 a {text-decoration:none; color:#222;} .latestList li {list-style:none; line-height:160%; font-size:12px;} .latestList ul.thumb li {position:relative; display:inline; float:left; margin-left:10px;} .latestList ul.thumb li.first {margin-left:0;} .latestList ul.thumb li img {vertical-align:top; width:130px;} .latestList ul.thumb li span {position:absolute; left:0; bottom:0; width:px; overflow:hidden; text-align:center;  font-size:11px; color:#fff; background:#000; opacity:.7; filter:alpha(opacity=70);} .latestList .btnPage {position:absolute; top:7px; right:0;} .latestList .btnPage li {display:inline; float:left;} .latestList.h2bg {border-bottom:none;} .latestList.h2bg ul.btnPage {right:10px;} .latestList.h2bg h2 {background:#f5f5f5; -moz-border-radius: 5px;} .latestList.h2bg h2 a {color:#000;}

 

 

댓글을 작성하려면 로그인이 필요합니다.

답변 5개

채택된 답변
+20 포인트

thumbnail.php화일을 그대로 두고  그 화일을 열어서 get_list_thumbnail()함수만 지워보세요.

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

애써 가르쳐 주셔서 감사합니다 ㅠㅠ

댓글을 작성하려면 로그인이 필요합니다.

정말 죄송합니다 귀찮게 질문을 해서 이젠 고수님이 가르쳐 주신데로 하니까 되긴 되는데 이젠 제가 올린 사진이 안보여요 정말 죄송합니다. 이거 좀 가르쳐 주세요.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

thumbnail.php 를 지우면 get_list_file 함수를 못블러오는 현상이며 또한 thumbnail.php 를 출력시키면 lib/thumbnail.lib.php 에서 충돌현상이 생기는거 같습니다.
로그인 후 평가할 수 있습니다

답변에 대한 댓글 3개

해결 좀 해주세요. ㅠㅠ 오늘 오후 까지 해결을 못하고 있어요 ㅠㅠ 해결 할 수 있는 방법좀 가르쳐주세요.
소스가 너무 복잡해서 도움줄수가 .... 저거 원본이 뭔지만 알면 간단하게 50줄 ? 이내로 줄일수있겠는데..
저 소스 보면 그누보드4 를 그누보드5 에 그대로 옴긴 소스가 생각이....
아네 그렇군요 그럼 할 수 없군요 어쨌든 감사합니다. ㅠㅠ

댓글을 작성하려면 로그인이 필요합니다.

지워도 안되는데요
 

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

동일한 함수가 중복 선언되었네요.

latest/tgallery 아래에 올린

thumbnail.php를 삭제해 보세요.

그리고

list.skin.php내에 있는 thumbnail.php를 불러오는 줄도 지우세요.

http://sir.kr/data/editor/1610/2f68b87ef5aada73ba0c359b7be7ff12_1476053266_7654.jpg" alt="2f68b87ef5aada73ba0c359b7be7ff12_1476053" style="margin: 0px; padding: 0px; border: 0px; vertical-align: middle; max-width: 100%; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px;"> 

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인

전체 질문 목록

🐛 버그신고