최신글 게디터 에서 지에디터 로 바꿀려면.. > 그누4 질문답변

그누4 질문답변

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

최신글 게디터 에서 지에디터 로 바꿀려면.. 정보

최신글 게디터 에서 지에디터 로 바꿀려면..

본문

$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4/{$ym}/[^<>]*\.(gif|jpg|png|bmp)", $edit_img, $tmp)) { // data/geditor------
$file = './' . $tmp[0]; // 파일명
$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
break;

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

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
    }
}

    if (file_exists($thumb))
        $thumfile = "<a href='{$list[$i][href]}'><img src='$thumb' width='{$img_width}' height='{$img_height}' border='0' style='border:0 #eee solid' onmouseover=this.style.filter='alpha(opacity=80)' onmouseout=this.style.filter=''></a>";
else
//이미지가 없으면
$thumfile="<a href='{$list[$i][href]}'><img src='$latest_skin_path/img/noimg.gif' width='{$img_width}' height='{$img_height}' style='border:0 #E7E7E7 solid'></a>";
//이미지가 아니네
        if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file))
      { $thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>"; }

위에서처럼 게디터 이미지를 뽑아오는데요..
지에디터를 이용하는 게시판이라 지에디터를 뽑아올려면 어떻게 바꿔야하나요?
  • 복사

댓글 전체

// 에디터
       
            // 내용뽑고
            $img_content = "{$list[$i]['wr_content']}";
       
            $img_tmp1 = stristr($img_content,'/data/geditor/'); // 지에디터 디렉토리 체크
            $img_tmp2 = strpos($img_tmp1,'>'); // 닫고
            $img_tmp3 = stristr(substr($img_tmp1,0,$img_tmp2+1),'geditor'); // 지에디터 부터 경로 시작
            $img_tmp4 = substr($img_tmp3,0,strpos($img_tmp3,'"')); // 더블쿼트 이전까지
            $img_fileurl = $g4['path']."/data/".$img_tmp4; // 원본파일 상대경로
       
            // 디렉토리에 파일이 있다면.
            if (file_exists($img_fileurl)) {
       
                // 파일명
                $img_filename = substr($img_tmp4,13);
       
            } else {
       
                // 파일명이 읍네 ?
                $img_filename = "";
       
            }
       
            // 썸네일
            $thumb = $thumb_path.'/'.$img_filename;
       
            // 원본
            $thumb_file = "{$img_fileurl}";
       
        }
       
        // 썸네일이 없다면
        if (!file_exists($thumb)) {
       
            // 확장자 체크
            if (preg_match("/\.(jp[e]?g|gif|png)$/i", $thumb_file) && file_exists($thumb_file)) {
       
                // 썸네일 생성. 가로, 세로, 원본경로, 생성경로
                createThumb($thumb_width, $thumb_height, $thumb_file, $thumb, true);
       
            }
       
        }
   
   
        if (file_exists($thumb) && $img_filename) {
       
            $img[$i] = "<a href='".$list[$i]['href']."' onfocus='this.blur();'><img src='".$thumb."' width='".$thumb_width."' height='".$thumb_height."' align='absmiddle' border='0'></a>";
       
        } else {
       
            $img[$i] = "";
       
        }
   
        // 제목
        $subject[$i] = conv_subject($list[$i]['wr_subject'], '30', '');

        // 링크
        $link[$i] = $list[$i]['href'];
       
    } else {

        // 제목
        $subject2 = conv_subject($list[$i]['wr_subject'], $subject_len, '');

        // 돌린다.
        $add_list .= "<dl class='list'><a href='".$list[$i]['href']."' class='text'>· ".$subject2."</a></dl>";

    }

}


if (count($list) == 0) {

    $img[0] = "<span class='text'>no image</span>";
    $link[0] = "#";
    $subject[0] = "<span class='text'>게시물이 없습니다.</span>";

    $img[1] = "<span class='text'>no image</span>";
    $link[1] = "#";
    $subject[1] = "<span class='text'>게시물이 없습니다.</span>";

    $add_list = "<span class='text'>게시물이 없습니다.</span>";

}


이렇게 붙여보니까 오류나네요.
찾으시는 내용이 정확히 무엇인지 이해를 못해서 자세한 도움은 드릴수가 없는점 죄송합니다.
http://www.sir.co.kr/bbs/board.php?bo_table=geditor_pds&wr_id=2
해당 링크는 지에디터 배포 하는 링크로 설치 방법에 대하여 기제 되어있습니다.
보시고 답을 못찾으신다면 곱슬최씨님께 쪽지 드려보세요.
아니면 마이위트에가셔서 질문하시면 빨리 ㄷㅂ을 얻으실수 잇을듯 합니다.
© SIRSOFT
현재 페이지 제일 처음으로