보통 파일 업로드 권한은 관리자 설정에서 정해주지만
에디터에서의 이미지 업로드 권한은 에디터를 쓰는 권한을 가진 회원은 누구나가 가능합니다.
아래의 코드를 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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 23966 | |
| 23963 | |
| 23953 | |
| 23949 | |
| 23938 | |
| 23935 | |
| 23933 | |
| 23928 | |
| 23919 | |
| 23918 | |
| 23917 | |
| 23910 | |
| 23902 | |
| 23901 | |
| 23897 | |
| 23894 | |
| 23893 | |
| 23891 | |
| 23885 | |
| 23872 | |
| 23870 | |
| 23862 | |
| 23859 | |
| 23853 | |
| 23845 | |
| 23838 | |
| 23827 | |
| 23819 | |
| 23805 | |
| 23801 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기