일단 html 모드를 사용하지 않을 경우에는 답변에 원글이 표시되는데
에디터 사용시에는 해당 답글의 원글이 표시 되지 않습니다.
에디터를 사용하면서도 답글의 원글이 표시되도록 수정했습니다.
write.skin.php 파일 상단에 editor_html2 함수를 만들어서 editor_html 함수를 복사해서 넣습니다.
===========================================================================================================
function editor_html2($id, $content, $is_dhtml_editor=true)
{
global $g5, $config;
static $js = true;
$editor_url = G5_EDITOR_URL.'/'.$config['cf_editor'];
$html = "";
$html .= "<span class=\"sound_only\">웹에디터 시작</span>";
if ($is_dhtml_editor)
$html .= '<script>document.write("<div class=\'cke_sc\'><button type=\'button\' class=\'btn_cke_sc\'>단축키 일람</button></div>");</script>';
if ($is_dhtml_editor && $js) {
$html .= "\n".'<script src="'.$editor_url.'/js/HuskyEZCreator.js"></script>';
$html .= "\n".'<script>var g5_editor_url = "'.$editor_url.'", oEditors = [];</script>';
$html .= "\n".'<script src="'.$editor_url.'/config.js"></script>';
$html .= "\n<script>";
$html .= '
$(function(){
$(".btn_cke_sc").click(function(){
if ($(this).next("div.cke_sc_def").length) {
$(this).next("div.cke_sc_def").remove();
$(this).text("단축키 일람");
} else {
$(this).after("<div class=\'cke_sc_def\' />").next("div.cke_sc_def").load("'.$editor_url.'/shortcut.html");
$(this).text("단축키 일람 닫기");
}
});
$(".btn_cke_sc_close").live("click",function(){
$(this).parent("div.cke_sc_def").remove();
});
});';
$html .= "\n</script>";
$js = false;
}
$smarteditor_class = $is_dhtml_editor ? "smarteditor2" : "";
$html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$smarteditor_class\" maxlength=\"65536\" style=\"width:100%\">$content</textarea>";
$html .= "\n<span class=\"sound_only\">웹 에디터 끝</span>";
return $html;
}
===========================================================================================================
그리고 아래 내용을 더 추가 해주시면 됩니다.
===========================================================================================================
if($w == "r") {
$content = "<br><br>========================= [원 글] =========================<div>".get_text($write['wr_content'], 0)."</div>";
$editor_html = editor_html2('wr_content', $content, true);
}
===========================================================================================================
혹시 몰라서 write.skin.php 파일을 첨부했으니 해당 파일을 확인해보시면 될 것 같습니다.
에디터 사용시에는 해당 답글의 원글이 표시 되지 않습니다.
에디터를 사용하면서도 답글의 원글이 표시되도록 수정했습니다.
write.skin.php 파일 상단에 editor_html2 함수를 만들어서 editor_html 함수를 복사해서 넣습니다.
===========================================================================================================
function editor_html2($id, $content, $is_dhtml_editor=true)
{
global $g5, $config;
static $js = true;
$editor_url = G5_EDITOR_URL.'/'.$config['cf_editor'];
$html = "";
$html .= "<span class=\"sound_only\">웹에디터 시작</span>";
if ($is_dhtml_editor)
$html .= '<script>document.write("<div class=\'cke_sc\'><button type=\'button\' class=\'btn_cke_sc\'>단축키 일람</button></div>");</script>';
if ($is_dhtml_editor && $js) {
$html .= "\n".'<script src="'.$editor_url.'/js/HuskyEZCreator.js"></script>';
$html .= "\n".'<script>var g5_editor_url = "'.$editor_url.'", oEditors = [];</script>';
$html .= "\n".'<script src="'.$editor_url.'/config.js"></script>';
$html .= "\n<script>";
$html .= '
$(function(){
$(".btn_cke_sc").click(function(){
if ($(this).next("div.cke_sc_def").length) {
$(this).next("div.cke_sc_def").remove();
$(this).text("단축키 일람");
} else {
$(this).after("<div class=\'cke_sc_def\' />").next("div.cke_sc_def").load("'.$editor_url.'/shortcut.html");
$(this).text("단축키 일람 닫기");
}
});
$(".btn_cke_sc_close").live("click",function(){
$(this).parent("div.cke_sc_def").remove();
});
});';
$html .= "\n</script>";
$js = false;
}
$smarteditor_class = $is_dhtml_editor ? "smarteditor2" : "";
$html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$smarteditor_class\" maxlength=\"65536\" style=\"width:100%\">$content</textarea>";
$html .= "\n<span class=\"sound_only\">웹 에디터 끝</span>";
return $html;
}
===========================================================================================================
그리고 아래 내용을 더 추가 해주시면 됩니다.
===========================================================================================================
if($w == "r") {
$content = "<br><br>========================= [원 글] =========================<div>".get_text($write['wr_content'], 0)."</div>";
$editor_html = editor_html2('wr_content', $content, true);
}
===========================================================================================================
혹시 몰라서 write.skin.php 파일을 첨부했으니 해당 파일을 확인해보시면 될 것 같습니다.
댓글 3개
게시글 목록
| 번호 | 제목 |
|---|---|
| 3757 | |
| 3747 | |
| 3734 | |
| 3733 | |
| 3721 | |
| 3717 | |
| 3716 | |
| 3709 | |
| 3696 | |
| 3694 | |
| 3656 | |
| 3655 | |
| 3618 | |
| 3595 | |
| 3593 | |
| 3580 | |
| 3559 | |
| 3558 | |
| 3543 | |
| 3539 | |
| 3534 | |
| 3530 | |
| 3527 | |
| 3524 | |
| 3523 | |
| 3514 | |
| 3513 | |
| 3511 | |
| 3507 | |
| 3495 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기