아몬2

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

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

댓글 7개

게시판 관리에서 체크 후 쓰기스킨 첫줄에다가 추가
if (!$is_admin) $is_dhtml_editor='';
정말 감사합니다 감사합니다 ㅠㅠ
혹시 그럼 게시판 관리자만 에디터가 나오게 할수도 있나요??
게시판 관리에서 체크 후 쓰기스킨 첫줄에다가 추가
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
오오~~ 잘 됩니다. 감사합니다~~!! ㅠㅠ
아니면 특정 레벨 이상에서만 에디터가 나오게 할수 있을까요?

예를 들어 레벨2이상에서만요...
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
14년 전 조회 1,244
14년 전 조회 824
14년 전 조회 710
14년 전 조회 2,858
14년 전 조회 1,862
14년 전 조회 1,132
14년 전 조회 3,442
14년 전 조회 1,452
14년 전 조회 1,374
14년 전 조회 1,746
14년 전 조회 975
14년 전 조회 1,631
14년 전 조회 840
14년 전 조회 949
14년 전 조회 1,584
14년 전 조회 781
14년 전 조회 788
14년 전 조회 827
14년 전 조회 1,048
14년 전 조회 745
🐛 버그신고