보통 파일 업로드 권한은 관리자 설정에서 정해주지만
에디터에서의 이미지 업로드 권한은 에디터를 쓰는 권한을 가진 회원은 누구나가 가능합니다.
아래의 코드를 write.skin.php 의 적당한 곳에 입력하면
이미지 업로드 버튼이 파일 업로드 권한을 가진 사람에게만 보여집니다.
기본코어를 건드리지 않고 에디터 로딩 후 동적으로 버튼을 보이지 않게 하였습니다.
단 이 코드는 smarteditor2 와 cheditor5 에만 적용됩니다.
[code]
<?php
if ($is_dhtml_editor && $member['mb_level'] < $board['bo_upload_level']) {
echo "<script>function noUpload() {";
if ($config['cf_editor'] == "smarteditor2") echo "wr_content.nextSibling.onload = function() {this.contentWindow.document.getElementsByClassName('se2_multy')[0].style.display = 'none';}";
else if ($config['cf_editor'] == "cheditor5") echo "document.getElementsByName('Image')[0].style.display = 'none';";
echo "} document.addEventListener('DOMContentLoaded', noUpload);</script>";
}
?>
[/code]
댓글 8개
게시글 목록
| 번호 | 제목 |
|---|---|
| 24149 | |
| 24140 | |
| 24133 | |
| 24125 | |
| 24119 | |
| 24109 | |
| 24105 | |
| 24101 | |
| 24093 | |
| 24089 | |
| 24077 | |
| 24074 | |
| 24071 | |
| 24070 | |
| 24067 | |
| 24056 | |
| 24050 | |
| 24046 | |
| 24043 | |
| 24040 | |
| 24037 | |
| 24036 | |
| 24035 | |
| 24034 | |
| 24021 | |
| 24017 | |
| 24005 | |
| 24002 | |
| 23990 | |
| 23980 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기