보통 파일 업로드 권한은 관리자 설정에서 정해주지만
에디터에서의 이미지 업로드 권한은 에디터를 쓰는 권한을 가진 회원은 누구나가 가능합니다.
아래의 코드를 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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 24318 | |
| 24317 | |
| 24315 | |
| 24309 | |
| 24294 | |
| 24293 | |
| 24277 | |
| 24262 | |
| 24260 | |
| 24253 | |
| 24251 | |
| 24236 | |
| 24233 | |
| 24228 | |
| 24226 | |
| 24221 | |
| 24214 | |
| 24203 | |
| 24201 | |
| 24199 | |
| 24196 | |
| 24195 | |
| 24194 | |
| 24192 | |
| 24191 | |
| 24187 | |
| 24185 | |
| 24183 | |
| 24172 | |
| 24168 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기