최신글 스킨 (갤러리형) 썸네일 노출 문제 > 그누4 질문답변

그누4 질문답변

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

최신글 스킨 (갤러리형) 썸네일 노출 문제 정보

최신글 스킨 (갤러리형) 썸네일 노출 문제

본문

안녕하세요..


아래와 같은 최신글 스킨(갤러리형)을 쓰고 있습니다.


<table width="540" height=155 border="2" cellpadding="0" cellspacing="0"
bordercolor="#D2E3E6" bgcolor="white" style="BORDER-COLLAPSE: collapse">
<tr><td>
<div align=center>


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

/*
 *    ez_cineV_Gallery Gnuboard4
 *
 *      latest.skin.php
 *     
 *      Copyright 2011 Man Hyung, cho
 *     
 *      File encoding: Korean(Euc-kr)
 *
 */


  $is_crop = 1;
// $is_crop    : 세로 높이가 $height를 넘을 때 crop 할 것인지를 결정
//                0 : crop 하지 않습니다
//                1 : 기본 crop
//                2 : 중간을 기준으로 crop


//불당썸---------------------------------------------------------------//
$img_width = 102; //표시할 이미지의 가로사이즈
$img_height = 78; //표시할 이미지의 세로사이즈



//언샾마스트 퀄리티(썸 노이즈바지)
$filter[type] = 99;
$filter[arg1] = 100;
$filter[arg2] = 1;
$filter[arg3] = 2;


$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path."/thumbnail";
$noimg = $latest_skin_path."/img/noimg.gif";


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

//$list_content = "450"; //내용길이
$cols  = 6;

function random_color(){
    mt_srand((double)microtime()*1000000);
    $c = '';
    while(strlen($c)<6){
        $c .= sprintf("%02X", mt_rand(0, 255));
    }
    return $c;
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="5" style="border-bottom:dotted 1px #333 ">
  <tr>
    <td bgcolor="#ffffff" width="102"><strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'>
      <?=$board[bo_subject]?>
    </a></strong></td>
    <td align="right">+ <a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'>more</a></td>
  </tr>
</table>
</td>   
  </tr>
</table>

<table width="102" border="0" cellspacing="0" cellpadding="0">
  <tr>
 
<? for ($i=0; $i<count($list); $i++) { ?>

<? //리스트 페이지 이미지 출력 

//썸네일 생성
$thumfile = "";
$thumb = $g4[path]."/data/file/" .$list[$i][bo_table]. "/thumbnail/" .$list[$i][wr_id];

$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];

// 업로드된 파일이 이미지라면
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $file) && file_exists($file)) {
$thumb = thumbnail($file, $img_width, $img_height, 0, 1, 90, 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 = $g4[path].'/' . $tmp[0]; // 파일명

 $thumb=thumbnail($file, $img_width, $img_height, 0, $is_crop, 90, 0, "",  $filter, $noimg); //언샾마스크추가

 }
}
if ($i>0 && $i%$cols==0) {
echo "<tr><td colspan='$cols'></td><tr>";
}

  $wr_content = preg_replace("/<(.*?)\>/"," ",$list[$i][wr_content]);
  $wr_content = preg_replace("/&nbsp;/"," ",$wr_content);
  $wr_content = str_replace("//##", " ", $wr_content);
  $wr_content1 = cut_str(get_text($wr_content), 100, '…');


 if (preg_match("/\.(jpg|gif|png|bmp)$/i", $thumb) && file_exists($thumb)) {
 
 ?>
        <td valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="3">
  <tr>
    <td bgcolor="<?=random_color()?>"><a href='<?=$list[$i]['href']?>'><img src='<?=$thumb?>' border='0'></a></td>
  </tr>
</table>
</td>
  </tr>
  <tr>
    <td align="center"><?
 echo "<a href='{$list[$i]['href']}'>";
            if ($list[$i]['is_notice'])
                echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
            else
                echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i]['subject']}</font>";
            echo "</a>";

            if ($list[$i]['comment_cnt'])
                echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i]['comment_cnt']}</span></a>";

            // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
            // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

            echo " " . $list[$i]['icon_new'];
            echo " " . $list[$i]['icon_file'];
            echo " " . $list[$i]['icon_link'];
            echo " " . $list[$i]['icon_hot'];
            echo " " . $list[$i]['icon_secret'];
            ?>
   
 </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

        </td>
        <?
 
 
 }

 
} ?>
  <? if (count($list) == 0) { echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td colspan=3 align=center height=100>자료가 없습니다.</td></tr></table>"; } ?>

  </tr>
  </table>
  </div>
</td></tr></table>


그런데 첨부파일로 이미지를 올리면 노출이 되는데,


내용안에 에디터로 사진을 올리면 노출이 되지 않습니다.


이리저리 해봐도 도무지 감이 안와서 해결이 안되네요.
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로