관리자만 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 ($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이상에서만요...