어떤분이 궁금해하셔서.. 수정할 파일은 두가지입니다.
지업로더와 ch에디터5 둘다 설치되어있다는 가정(????) 하에..ㅋ
첫번째로
cheditor5 폴더안의 cheditor.js 를 열어서
insertHtmlPopup: function (elem) {
......
}, 이부분 아래에 아래부분을 추가해주세요
///////////////////////추가할부분 ////////////////////////////
insertHTML2: function (html) {
this.editArea.focus();
var range = this.range || this.getRange();
var quote = this.doc.createElement("div");
quote.style.padding = "5px 10px";
quote.innerHTML = html;
if (GB.browser.msie) {
this.setRange(range);
this.insertHTML(quote.outerHTML);
var textRange = this.doc.body.createTextRange();
textRange.moveToElementText(range.parentElement());
textRange.collapse(false);
textRange.select();
}
else {
quote.appendChild(range != '' ? range.extractContents() : this.doc.createElement('br'));
this.insertNodeAtSelection(quote);
}
this.setImageEvent(true);
},
/////////////////////여기까지 추가할부분 ////////////////////////////////////
두번째로 guploader폴더안의 guploader.js를 열어서
this.insert_editor = function(html) {
// 스마트 에디터 본문 삽입;김철호110430
if(oEditors.getById["ir1"])
{
oEditors.getById["ir1"].exec("PASTE_HTML", ["<br>"+html]);
}
else
{
geditor_wr_content.get_range(); //content->wt_content로 수정;김철호071116
geditor_wr_content.insert_editor(html); //content->wt_content로 수정;김철호071116
}
}
이부분을
///////////////////////////////////////교체부분///////////////////
this.insert_editor = function(html) {
ed_wr_content.insertHTML2(html);
}
///////////////////////////////////////교체부분///////////////////
교체해주시면 됩니다. 물론 개인별 설정 wr_content 나.. 여러에디터를 사용하실경우에..
insertHTML2(html);부분만 주의해서 추가하시면 될듯싶어요..^^;;;
추가사항..
댓글로 찌꺼기파일에 대한 문제점을 알려주셔서.. 제가 쓴 방법도 공개합니다..
아래소스를.. 스킨폴더안의 write.update.skin.php 파일에 넣어주시면 될듯싶어요~~;;
//////////////////////////////////////////////////////////////////////////
$now_time = time();
// 분단위입니다.. 30분이면 60*30 으로 해주시면 됨..쉽죠?
$keep_time = 60 * 1;
$sql = " select bf_file,bf_datetime from $g4[board_file_table] where bo_table = '$bo_table' and wr_id > '100000000'";
$result = sql_query($sql);
while ($row = sql_fetch_array($result))
{
$up_time = preg_replace("/[^0-9]*/s", "", $row[bf_datetime]); // 업로드된 파일시간 공백,문자 제거
$up_time = strtotime($up_time); //TimeT 로 변환
$del_time = $up_time + $keep_time; // 삭제시간
if($now_time > $del_time) {
// 파일삭제
@unlink($g4[path]."/data/file/".$bo_table."/".$row[bf_file]);
// DB 삭제
sql_query(" delete from $g4[board_file_table] where bf_file='$row[bf_file]'");
}
}
///////////////////////////////////////////////////////////////////////
위와같이 하게되면.. 찌꺼기파일들을 본인또는 다른사람이 해당게시판에 글을 올릴때마다 찌꺼기파일을
삭제해주기때문에.. 찌꺼기들이 남는 불상사는 피할수 있을겁니다..
잘될라나 모르겠네요..
확인해보실분들은
http://newzes.mireene.co.kr/ 에서 한번 해보세요~~
지업로더와 ch에디터5 둘다 설치되어있다는 가정(????) 하에..ㅋ
첫번째로
cheditor5 폴더안의 cheditor.js 를 열어서
insertHtmlPopup: function (elem) {
......
}, 이부분 아래에 아래부분을 추가해주세요
///////////////////////추가할부분 ////////////////////////////
insertHTML2: function (html) {
this.editArea.focus();
var range = this.range || this.getRange();
var quote = this.doc.createElement("div");
quote.style.padding = "5px 10px";
quote.innerHTML = html;
if (GB.browser.msie) {
this.setRange(range);
this.insertHTML(quote.outerHTML);
var textRange = this.doc.body.createTextRange();
textRange.moveToElementText(range.parentElement());
textRange.collapse(false);
textRange.select();
}
else {
quote.appendChild(range != '' ? range.extractContents() : this.doc.createElement('br'));
this.insertNodeAtSelection(quote);
}
this.setImageEvent(true);
},
/////////////////////여기까지 추가할부분 ////////////////////////////////////
두번째로 guploader폴더안의 guploader.js를 열어서
this.insert_editor = function(html) {
// 스마트 에디터 본문 삽입;김철호110430
if(oEditors.getById["ir1"])
{
oEditors.getById["ir1"].exec("PASTE_HTML", ["<br>"+html]);
}
else
{
geditor_wr_content.get_range(); //content->wt_content로 수정;김철호071116
geditor_wr_content.insert_editor(html); //content->wt_content로 수정;김철호071116
}
}
이부분을
///////////////////////////////////////교체부분///////////////////
this.insert_editor = function(html) {
ed_wr_content.insertHTML2(html);
}
///////////////////////////////////////교체부분///////////////////
교체해주시면 됩니다. 물론 개인별 설정 wr_content 나.. 여러에디터를 사용하실경우에..
insertHTML2(html);부분만 주의해서 추가하시면 될듯싶어요..^^;;;
추가사항..
댓글로 찌꺼기파일에 대한 문제점을 알려주셔서.. 제가 쓴 방법도 공개합니다..
아래소스를.. 스킨폴더안의 write.update.skin.php 파일에 넣어주시면 될듯싶어요~~;;
//////////////////////////////////////////////////////////////////////////
$now_time = time();
// 분단위입니다.. 30분이면 60*30 으로 해주시면 됨..쉽죠?
$keep_time = 60 * 1;
$sql = " select bf_file,bf_datetime from $g4[board_file_table] where bo_table = '$bo_table' and wr_id > '100000000'";
$result = sql_query($sql);
while ($row = sql_fetch_array($result))
{
$up_time = preg_replace("/[^0-9]*/s", "", $row[bf_datetime]); // 업로드된 파일시간 공백,문자 제거
$up_time = strtotime($up_time); //TimeT 로 변환
$del_time = $up_time + $keep_time; // 삭제시간
if($now_time > $del_time) {
// 파일삭제
@unlink($g4[path]."/data/file/".$bo_table."/".$row[bf_file]);
// DB 삭제
sql_query(" delete from $g4[board_file_table] where bf_file='$row[bf_file]'");
}
}
///////////////////////////////////////////////////////////////////////
위와같이 하게되면.. 찌꺼기파일들을 본인또는 다른사람이 해당게시판에 글을 올릴때마다 찌꺼기파일을
삭제해주기때문에.. 찌꺼기들이 남는 불상사는 피할수 있을겁니다..
잘될라나 모르겠네요..
확인해보실분들은
http://newzes.mireene.co.kr/ 에서 한번 해보세요~~
댓글 9개
게시글 목록
| 번호 | 제목 |
|---|---|
| 34292 | |
| 34279 | |
| 34278 | |
| 34264 | |
| 34251 | |
| 34231 | |
| 34196 | |
| 34184 | |
| 34166 | |
| 34151 | |
| 34143 | |
| 34142 | |
| 34134 | |
| 34132 | |
| 34131 | |
| 34125 | |
| 34093 | |
| 34076 | |
| 34060 | |
| 34031 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기