그누보드5 환경에 그누보드4 게시판 설치시 쓰기페이지 질문드립니다. 채택완료
관리자 페이지에서 DHTML사용을 체크하면 글쓰기 페이지에 게시판이 안나오네요..
체크해제하면 다시 쓰기페이지가 나옵니다.
에디터 기능을 넣어야하는데 체크 시 안나오는게 어떤 오류인지 궁금합니다.
서버환경은 그누5가 설치되있는데.. 스킨은 그누4 버전이거든요.. 이게 문제 되는건가요?
지금 와서 다시 그누5 스킨으로 변경이 어려운 상황인데.. 어떻게 하면 에디터를 사용 할 수 있을지
답변 꼭 부탁드립니다. ㅜ
쓰기페이지 첨부올려요~ 제발 도와주세요 ㅜㅜ
답변 2개
쓰기페이지 소스입니다.
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($is_dhtml_editor) {
include_once("$g4[path]/lib/cheditor4.lib.php");
echo "";
echo cheditor1('wr_content', '100%', '250');
}
?>
a, a:link, a:active, a:visited { color:#666666; }
a:hover {color:#999; text-decoration:none;}
.write_head { height:30px; text-align:center; color:#666666; }
.write_box {text-align:left;}
.field {background-color:#666666;color:#666666;}
.ed {color:#666666; height:20px; font:normal 12px dotum; }
.edt {color:#666666; height:20px; font:normal 12px dotum; }
// 글자수 제한
var char_min = parseInt(=$write_min?>); // 최소
var char_max = parseInt(=$write_max?>); // 최대
function imageClick() {
var url = "=$g4[bbs_path]?>/kcaptcha_session.php";
var para = "";
var myAjax = new Ajax.Request(
url,
{
method: 'post',
asynchronous: true,
parameters: para,
onComplete: imageClickResult
});
}
function imageClickResult(req) {
var result = req.responseText;
var img = document.createElement("IMG");
img.setAttribute("src", "=$g4[bbs_path]?>/kcaptcha_image.php?t=" + (new Date).getTime());
document.getElementById('kcaptcha_image').src = img.getAttribute('src');
md5_norobot_key = result;
}
if (!$is_member) { ?>Event.observe(window, "load", imageClick); } ?>
// 관리자라면 분류 선택에 '공지' 옵션을 추가함
if ($is_admin)
{
echo "
if (typeof(document.fwrite.ca_name) != 'undefined')
{
document.fwrite.ca_name.options.length += 1;
document.fwrite.ca_name.options[document.fwrite.ca_name.options.length-1].value = '공지';
document.fwrite.ca_name.options[document.fwrite.ca_name.options.length-1].text = '공지';
}";
}
?>
with (document.fwrite)
{
if (typeof(wr_name) != "undefined")
wr_name.focus();
else if (typeof(wr_subject) != "undefined")
wr_subject.focus();
else if (typeof(wr_content) != "undefined")
wr_content.focus();
if (typeof(ca_name) != "undefined")
if (w.value == "u")
ca_name.value = "=$write[ca_name]?>";
}
function html_auto_br(obj)
{
if (obj.checked) {
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을 태그로 변환하는 기능입니다.");
if (result)
obj.value = "html2";
else
obj.value = "html1";
}
else
obj.value = "";
}
function fwrite_submit(f)
{
if ($g4[https_url])
echo "f.action = '$g4[https_url]/$g4[bbs]/write_update.php';";
else
echo "f.action = './write_update.php';";
?>
if (document.getElementById('char_count')) {
if (char_min > 0 || char_max > 0) {
var cnt = parseInt(document.getElementById('char_count').innerHTML);
if (char_min > 0 && char_min > cnt) {
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
return false;
}
else if (char_max > 0 && char_max < cnt) {
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
return false;
}
}
}
if (document.getElementById('tx_wr_content')) {
if (!ed_wr_content.outputBodyText()) {
alert('내용을 입력하십시오.');
ed_wr_content.returnFalse();
return false;
}
}
if ($is_dhtml_editor) echo cheditor3('wr_content');
?>
if (typeof(f.wr_key) != 'undefined') {
if (hex_md5(f.wr_key.value) != md5_norobot_key) {
alert('자동등록방지용 글자가 제대로 입력되지 않았습니다.');
f.wr_key.select();
f.wr_key.focus();
return false;
}
}
document.getElementById('btn_submit').disabled = true;
document.getElementById('btn_list').disabled = true;
return true;
}
답변에 대한 댓글 2개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
그냥 그누보드 5 공개 스킨 중에서 적당한 것으로 찾아보세요.