포인트10,000점 ... 썸네일 생성시 리스트화면 반영및 삭제가 안되는 문제 > 그누4 질문답변

그누4 질문답변

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

포인트10,000점 ... 썸네일 생성시 리스트화면 반영및 삭제가 안되는 문제 정보

포인트10,000점 ... 썸네일 생성시 리스트화면 반영및 삭제가 안되는 문제

첨부파일

photo_thumb.zip (44.4K) 6회 다운로드 2010-07-13 09:11:27

본문

포인트 10,000점 겁니다 -_- ;;


안녕하십니까?
이전에 스키을 하나 작업해서 등록해뒀는데요~

[스킨] http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=42135

위 스킨을 최신버젼에 맞게 재수정해서 등록하려니 머리가 돌아가지도 않고 작업진행이 안되서
며칠을 헤매다가 결국 다소 무리인듯 하지만 부탁글을 한번 올려봅니다.
썸네일의 생성및 삭제와 관련한 문제입니다


- 벤치마킹하기 위해서 일부 스킨을 들여다 보니, 썸네일 생성시 리스트화면에서 반영은 되는데
- 소스를 들여다 보니, 썸네일파일과 jpg파일이 함께 생성되고 삭제시 이또한 삭제가 되지를 않는 경경가 많고
- 짜집기가 워낙에 많아서 어느게 원본스킨인지 확인하기도 힘듭니다
- 일부 수준~~높은 스킨의 경우는 그누보드 원소스의 db쪽도 건드린게 많아서 그것도 좀 안맞네요


결국 제가 올렸던 스킨을 재수정해 보려고 하는데
작업한지도 오래되었고, 본 스킨도 썸네일부분은 도움을 좀 받아서 작업이 진행되었던거라
혼자서 작업이 되지를 않는군요~

그래서 도움글을 좀 받으려고 글을 올리게 된 점 양해 부탁드립니다


위 스킨의 문제점및 수정하고자 하는 내용은 아래와 같습니다
----------------------------------------------------------------------------------------
01. 리스트화면(list.skin.php)에서 ....
    이미 등록된 게시물(갤러리)의 이미지를 다른파일로  변경하여 등록(수정)할경우,
    새로 등록된 이미지가 보여지지를 않고 처음 올렸던 이미지가 그대로 보여집니다
    물론, 뷰화면에서는 등록된 이미지가 있는데 결국 리스트화면에서 썸네일이 반영이 안됩니다

02. 게시물의 이미지를 삭제할경우, 게시물은 삭제되지만
    삭제된 게시물의 썸네일들은 삭제가 되지를 않고 그대로 남아 버립니다.
    그래서 썸네일 찌꺼기가 계속 쌓이는 문제가 생기네요
    - 일반적으로 뷰화면에서 '글삭제'시
    - 관리자모드로 리스트화면에서 '여러게시물을 선택삭제시' .... 모두 썸네일이 삭제안됩니다

--------------------------------------------------------------------------------------

이미 등록된 게시물(이미지)를 수정하여 새로 이미지 등록시
기존 게시물의 썸네일은 삭제되고 새로 등록한 이미지의 썸네일이 리스트화면에 반영되도록 햇으면 합니다

그리고 게시물 삭제시 삭제된 게시물의 썸네일도 함께 삭제 되었으면 합니다
이와 관련한 도움을 정중히 부탁드려 봅니다.

★★★★★★★★★★★★★★★★★★★
- 포인트가 포인트인 만큼 가능한, 그노보드의 db쪽은 손대지 않고 현재의 스킨에서 작성된 코드를
  유지하는 차원에서 수정작업이 되길 희망해봅니다. 안된다면 할수 없구요~
- 바로 적용가능한 팁이나 다양한 방법의 도움을 부탁드립니다

- p.s; 해당스킨을 압축파일로 등록합니다.
★★★★★★★★★★★★★★★★★★★










---------------------------------------------
문제의 list.skin.php 내용입니다 (압축파일에 포함)
---------------------------------------------

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

// 선택옵션으로 인해 셀합치기가 가변적으로 변함
//$colspan = 5;

//if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;

// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>

<?
// '여유필드 1'은 write.skin.php에서 사용하므로 입력금지
if ($board[bo_2]) {
alert("여유필드2은 글쓰기에서 사용하므로 비워두셔야 합니다", $admin_href);
}

if (!$board[bo_3]) { // '여유필드 3'에 입력값이 없을경우(리스트화면에서 새창보기)
alert("이미지보기설정 : 리스트화면에서 이미지보기 설정을 위해 \'여분필드 3\'에  숫자를 입력해주세요\\n\\n ★ 여유필드3 설정방법(숫자 1,2,3,4중 선택입력) \\n\\n 1 : 이미지:뷰화면에서 보기 | 제목글:뷰화면으로 이동 \\n 2 : 이미지:뷰화면에서 새창 | 제목글:뷰화면으로 이동 \\n 3 : 모두 새창으로 보기 \\n 4 : 클릭안됨  \\n\\n 기타 임의의 숫자를 사용할경우, 리스트상에서 모두 클릭안됨", $admin_href);
}
?>

<?
// 제목길이 잘 맞추세요.
$thu_width = '150';    //썸네일 폭
$thu_height = '110';  //썸네일 높이
$thu_quality = '100';  //썸네일 퀄리티_100 이하

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

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

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

$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);
?>


<style>
.board_top { clear:both; }

.board_list { clear:both; width:100%; table-layout:fixed; margin:5px 0 0 0; }
.board_list th { font-weight:bold; font-size:12px; }
.board_list th { background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; }
.board_list th { white-space:nowrap; height:34px; overflow:hidden; text-align:center; }
.board_list th { border-top:1px solid #ddd; border-bottom:1px solid #ddd; }

.board_list tr.bg0 { background-color:#fafafa; }
.board_list tr.bg1 { background-color:#ffffff; }

.board_list td { padding:.2em; }
.board_list td { border-bottom:1px solid #ddd; }
.board_list td.num { color:#999999; text-align:center; }
.board_list td.checkbox { text-align:center; }
.board_list td.subject { overflow:hidden; }
.board_list td.name { padding:0 0 0 0px; text-align:center; }
.board_list td.datetime { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.hit { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.good { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.nogood { font:normal 11px tahoma; color:#BABABA; text-align:center; }

.board_list .notice { font-weight:normal; }
.board_list .current { font:bold 11px tahoma; color:#E15916; }
.board_list .comment { font-family:Tahoma; font-size:10px; color:#EE5A00; }

.board_button { clear:both; margin:10px 0 0 0; }

.board_page { clear:both; text-align:center; margin:3px 0 0 0; }
.board_page a:link { color:#777; }

.board_search { text-align:center; margin:10px 0 0 0; }
.board_search .stx { height:21px; border:1px solid #9A9A9A; border-right:1px solid #D8D8D8; border-bottom:1px solid #D8D8D8; }

.bo_line {
    font-size: 1px; /* div 라인. 폰트사이즈를 반드시 기재 */
    text-align: center;
    height:1px;
    line-height:1px;
    margin:0 0 0 0;
background-color:#bbbbbb;
}

.bo_line2 {
        background:url("<?=$board_skin_path?>/img/line_dot.gif") 1px 1px;
        text-align: center;
        font-size: 1px; /* div 라인. 폰트사이즈를 반드시 기재 */
        height:1px;
        line-height:1px;
        margin:0 0 0 0;
}
</style>

<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0">
<tr><td>

    <!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
    <div class="board_top" style='height:24px'>
        <div style="float:left;">
            <form name="fcategory" method="get" style="margin:0px;">
            <? if ($is_category) { ?>
            <select name=sca onchange="location='<?=$category_location?>'+this.value;">
            <option value=''>전체</option>
            <?=$category_option?>
            </select>
            <? } ?>
            </form>
&nbsp;
<? if ($is_checkbox) { ?>
<input onclick="if (this.checked) all_checked(true); else all_checked(false);" type="checkbox">
<?}?>
&nbsp;<? if($board[bo_3] == '2') { echo "<font color='#0066CC'>+ 게시물에 등록된 <font color='red'>전체 이미지</font>를 보시려면 '제목글'을 클릭하세요</font>";} ?>
        </div>
<div style="float:right;margin-top:3px;">
            <img src="<?=$board_skin_path?>/img/icon_total.gif" align="absmiddle" border='0'>
            <span style="color:#888888; font-weight:bold;">Total <?=number_format($total_count)?></span>
            <? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border='0' align="absmiddle"></a><?}?>
            <? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" border='0' title="관리자" align="absmiddle"></a><?}?>
        </div>
    </div>
<div class='bo_line' style='clear:both;'>&nbsp;</div>

    <!-- 제목 -->
    <form name="fboardlist" method="post">
    <input type='hidden' name='bo_table' value='<?=$bo_table?>'>
    <input type='hidden' name='sfl'  value='<?=$sfl?>'>
    <input type='hidden' name='stx'  value='<?=$stx?>'>
    <input type='hidden' name='spt'  value='<?=$spt?>'>
    <input type='hidden' name='page' value='<?=$page?>'>
    <input type='hidden' name='sw'  value=''>

<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>

<?
for ($i=0; $i<count($list); $i++) {
    if ($i && $i%$mod==0)
        echo "</tr><td colspan='{$mod}' height=5></td></tr>";

/* -- 이미지수 정정표시 해결 (97~108) --
첫번째 이미지 없거나 삭제시, 두번째 이미지가 있는데도 불구하고 '노이미지 나오는 문제'는 해결안됨 */

$img_cnt = array() ;
for ($k=0,$img_num=0; $k<$list[$i][file][count]; $k++) {
      if($list[$i][file][$k][file]) { //break;
              $img_cnt[$img_num]=$list[$i][file][$k][file] ;
              $img_num ++;
        }
}
$max_img_cnt = count($img_cnt);
$image = $img_cnt[0];
    //$image = $list[$i][file][0][file]; -- 위의것으로 대체

    $thumbnail_img = "<img src='$board_skin_path/img/no_image.jpg' border=0 width='$thu_width' title='이미지 없음' style='border:1px solid #cccccc'>";

    $thumb = $thumb_path.'/'.$list[$i][wr_id];
    if (!file_exists($thumb))
    {
        $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
        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
                continue;

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

            if ($height < $thu_height)
                $dst = imagecreatetruecolor($thu_width, $height);
            else
                $dst = imagecreatetruecolor($thu_width, $thu_height);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $thu_width, $height, $size[0], $size[1]);
            imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thu_quality);
            chmod($thumb_path.'/'.$list[$i][wr_id], 0707);
        }
    }

    if (file_exists($thumb))
        $thumbnail_img = "<img src='$thumb' width='$thu_width' border=0 style='border:3px solid #666666;'>";

/* ---------------------- 옵션 ----------------------------------- */
    $title = "이미지크게보기";
$file_cnt = $list[$i][file][count];  // 게시물당 등록된 파일갯수
if($file_cnt >=2) {$fcolor='#FF0000';}else{$fcolor='#888888';}  // 등록파일이 두개이상인경우, 글자색상

    //$content = cut_str(get_text($list[$i][wr_content]), 80);      // 내용보기시 글자수
//$subject = cut_str(get_text($list[$i][subject]), 20, '...');  // 제목글 글자수
$subject = $list[$i][subject];

//---- 이미지 새창보기 여부 설정
if($board[bo_3] == '1') { // 뷰화면에서 이미지보기
$view_img  = "<a href='{$g4[bbs_path]}/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&page=$page'>";
$view_href = "<a class='bl' href='{$g4[bbs_path]}/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&page=$page'>";
}
if($board[bo_3] == '2') { // 리스트이미지:새창, 제목글:뷰화면
$view_img  = "<a href=\"javascript:;\" OnClick=\"image_viewer('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\">";
$view_href = "<a class='bl' href='{$g4[bbs_path]}/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&page=$page'>";
}
if($board[bo_3] == '3') { // 모두 새창으로 보기
$view_img  = "<a href=\"javascript:;\" OnClick=\"image_viewer('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\">";

if($member[mb_level] <= 9) {
$view_href  = "<a class='bl' href=\"javascript:;\" OnClick=\"image_viewer('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\">";
}else {
$view_href = "<a class='bl' href='{$g4[bbs_path]}/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&page=$page'>";
}
}

    $checkbox = "";
    if ($is_checkbox)
        $checkbox = "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";

        $comment = " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:8pt;'>{$list[$i][comment_cnt]}</span></a>";
/* ---------------------- 옵션 ----------------------------------- */

$style = "";
    if ($list[$i][icon_new])
        $style = " style='font-weight:bold;' ";
    $subject = "<span $style>".cut_str($list[$i][subject],25)."</span>";

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

    echo "<td width='{$td_width}%' align='center' valign=top style='word-break:break-all;'>\n";

/* ------ 이미지 정보출력 --- */
echo "<table border='0' cellpadding='1' cellspacing='0' style='border:0px solid #cccccc'>";
echo "<tr>";
echo "<td height='130' align='center' style='word-break:break-all; padding:2 0 2 0;'>";
echo "{$view_img}";
echo $thumbnail_img;
echo "</a>";
echo "</td></tr>";
echo "<tr>";
echo "<td height=18 align='center'>{$checkbox}&nbsp;";
echo "{$view_href}";
echo "<span style='letter-spacing:-1px'>{$subject}</span></a>&nbsp;";

echo $comment_cnt;

echo "</td></tr>";
echo "<tr>";
if($board[bo_3] !== '3') {
echo "<td height=18 align='center' style='word-break:break-all;'><span style='font-family:Dotum, AppleGothic, sans-serif; font-size:12px;letter-spacing:-1px;'><font color='{$fcolor}'>이미지수 : {$max_img_cnt}</font>&nbsp;&nbsp;<font color='#888888'>조회 : {$list[$i][wr_hit]}</font></span></td></tr>";
}
    echo "</table>";
/* ------ 이미지 정보출력 --- */

echo "</td>\n";
}

// 나머지 td
$cnt = $i%$mod;
if ($cnt)
    for ($i=$cnt; $i<$mod; $i++)
        echo "<td width='{$td_width}%'>&nbsp;</td>";
?>
</tr>
<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>

</table>
</form>

<div class='bo_line' style='clear:both;'>&nbsp;</div>
    <div class="board_button">
        <div style="float:left;">
        <? if ($list_href) { ?>
        <a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" align="absmiddle" border='0'></a>
        <? } ?>
        <? if ($is_checkbox) { ?>
        <a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" align="absmiddle" border='0'></a>
        <a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" align="absmiddle" border='0'></a>
        <a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" align="absmiddle" border='0'></a>
        <? } ?>
        </div>

        <div style="float:right;">
        <? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border='0'></a><? } ?>
        </div>
    </div>

    <!-- 페이지 -->
    <div class="board_page">
        <? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/page_search_prev.gif' border='0' align=absmiddle title='이전검색'></a>"; } ?>
        <?
        // 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
        //echo $write_pages;
        $write_pages = str_replace("처음", "<img src='$board_skin_path/img/page_begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
        $write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
        $write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
        $write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/page_end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
        //$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "$1", $write_pages);
        $write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><span style=\"color:#4D6185; font-family:gulim;  font-size:13px; text-decoration:underline;\">$1</span></b>", $write_pages);
        ?>
        <?=$write_pages?>
        <? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/page_search_next.gif' border='0' align=absmiddle title='다음검색'></a>"; } ?>
    </div>

    <!-- 검색 -->
    <div class="board_search">
        <form name="fsearch" method="get">
        <input type="hidden" name="bo_table" value="<?=$bo_table?>">
        <input type="hidden" name="sca"      value="<?=$sca?>">
        <select name="sfl">
            <option value="wr_subject">제목</option>
            <option value="wr_content">내용</option>
            <option value="wr_subject||wr_content">제목+내용</option>
            <option value="mb_id,1">회원아이디</option>
            <option value="mb_id,0">회원아이디(코)</option>
            <option value="wr_name,1">글쓴이</option>
            <option value="wr_name,0">글쓴이(코)</option>
        </select>
        <input name="stx" class="stx" maxlength="15" itemname="검색어" required value='<?=$stx?>'>
        <input type="image" src="<?=$board_skin_path?>/img/btn_search.gif" border='0' align="absmiddle">
        <input type="radio" name="sop" value="and">and
        <input type="radio" name="sop" value="or">or
        </form>
    </div>

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

<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
    document.fsearch.sfl.value = '<?=$sfl?>';

    if ('<?=$sop?>' == 'and')
        document.fsearch.sop[0].checked = true;

    if ('<?=$sop?>' == 'or')
        document.fsearch.sop[1].checked = true;
} else {
    document.fsearch.sop[0].checked = true;
}
</script>

<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw) {
    var f = document.fboardlist;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]")
            f.elements[i].checked = sw;
    }
}

function check_confirm(str) {
    var f = document.fboardlist;
    var chk_count = 0;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
            chk_count++;
    }

    if (!chk_count) {
        alert(str + "할 게시물을 하나 이상 선택하세요.");
        return false;
    }
    return true;
}

// 선택한 게시물 삭제
function select_delete() {
    var f = document.fboardlist;

    str = "삭제";
    if (!check_confirm(str))
        return;

    if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
        return;

    f.action = "./delete_all.php";
    f.submit();
}

// 선택한 게시물 복사 및 이동
function select_copy(sw) {
    var f = document.fboardlist;

    if (sw == "copy")
        str = "복사";
    else
        str = "이동";
                     
    if (!check_confirm(str))
        return;

    var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");

    f.sw.value = sw;
    f.target = "move";
    f.action = "./move.php";
    f.submit();
}
</script>

<? } ?>
<!-- 게시판 목록 끝 -->
  • 복사

댓글 전체

썸네일을 wr_id 로 생성해서 그렇습니다.

파일명으로 하면 이미지가 변경 되어도 생성 될 것 같습니다.

$thumb = $thumb_path.'/'.$list[$i][wr_id];
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thu_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0707);

위 코드를 아래처럼

$thumb = $thumb_path.'/'.$list[$i][file][0][file];
imagejpeg($dst, $thumb_path.'/'.$list[$i][file][0][file], $thu_quality);
chmod($thumb_path.'/'.$list[$i][file][0][file], 0707);
[수정댓글]

리플 감사합니다... 말씀하신 코드가 벤치마킹하려고 들여다 봤던 코드의 일부인데요.

조언해주신 대로 적용를 해서 thumb폴더를 확인해보면...
제가 아까 섞인 코드를 분리하지 못해서 별도의 썸네일 파일과 jpg형태의 썸네일 파일 2개가 생성되는것으로 보았는데 다시 확인해보니 jpg포맷의 썸네일 파일 1개만 생성되는것을 확인할수 있습니다

화질의 차이는 조금 느껴지지만 어쨋던 등록된 이미지 파일의 변경(수정)시,
리스트화면에서 변경된 이미지가 적용은 되는군요.

두번째 문제로 언급한,
게시물의 이미지 수정or삭제시 변경전의 기존 썸네일파일이 삭제되지 않고 쌓이는 문제가 해결이 안되는군요.

p.s; 어쨋던 마무리를 좀 해야하는데.. 갈수록 머리가 굳어가는 느낌...에효~ -_- ;;
다음 링크의 스킨에서 썸네일을 어떤 식으로 생성하는지 참고해보시면 좋을 것 같네요.

http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=108571

전체적인 썸네일 관리가 된다는 점이 포인트죠.
bbs폴더에서 delete.php 76번째줄 delete_all.php 93번째줄에

 while ($row2 = sql_fetch_array($result2)){
                // 파일삭제
                @unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]");
              @unlink("썸네일경로/썸네일명");
}이렇게 해주시면 삭제 되구여...

수정시에는bbs/write_update.php
164번째줄
        @unlink("$g4[path]/data/file/$bo_table/$row[bf_file]"); 밑에
    @unlink("썸네일경로/썸네일명");  추가


일케 해주시면 될듯하네요.....하시기 전에 ftp썸넬 폴더에 있는 썸네일 다 삭제 해주시구요~~
© SIRSOFT
현재 페이지 제일 처음으로