관리자만 에디터가 나오게 하려면? > 그누4 질문답변

그누4 질문답변

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

관리자만 에디터가 나오게 하려면? 정보

관리자만 에디터가 나오게 하려면?

본문

관리자만 DHTML 에디터가 나오게 하려면 어떻게 해야 할까요?
해결 방법좀 부탁드립니다. ㅠㅠ
  • 복사

댓글 전체

게시판 관리에서 체크 후 쓰기스킨 첫줄에다가 추가
if ($board[bo_admin] != $member[mb_id]) $is_dhtml_editor='';

게시판 관리자 / 관리자만 DHTML 에디터 출력
if (($board[bo_admin] != $member[mb_id]) || !$is_admin) $is_dhtml_editor='';
위의 if (!$is_admin) $is_dhtml_editor='';  는 되는데

if ($board[bo_admin] != $member[mb_id]) $is_dhtml_editor='';
if (($board[bo_admin] != $member[mb_id]) || !$is_admin) $is_dhtml_editor='';

이 두개는 안되네요 ㅠㅠ
테스트 해 보았는데 제대로 먹히는 걸로 확인이 되었어요 ㅜ

write.skin.php 맨 상단에

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

if ($board[bo_admin] != $member[mb_id]) $is_dhtml_editor='';

if ($is_dhtml_editor) {
    include_once("$g4[path]/lib/cheditor4.lib.php");
    echo "<script src='$g4[cheditor4_path]/cheditor.js'></script>";
    echo cheditor1('wr_content', '100%', '250');
}
?>

이렇게 입력이 되어 있으시면 되구요, 레벨 2 이상에서만 에디터 사용이 가능하게 하려면

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

if ($member[mb_level] < 2) $is_dhtml_editor='';

if ($is_dhtml_editor) {
    include_once("$g4[path]/lib/cheditor4.lib.php");
    echo "<script src='$g4[cheditor4_path]/cheditor.js'></script>";
    echo cheditor1('wr_content', '100%', '250');
}
?>

이렇게 작성 하시면 됩니다. :D
© SIRSOFT
현재 페이지 제일 처음으로