에디터 이미지 업로드 권한을 파일 업로드 권한과 동일하게 주기
보통 파일 업로드 권한은 관리자 설정에서 정해주지만
에디터에서의 이미지 업로드 권한은 에디터를 쓰는 권한을 가진 회원은 누구나가 가능합니다.
아래의 코드를 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개
감사합니다. 별루 멋진 팁 아니에요.ㅋ
감사합니다.
게시판 목록
그누보드5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 | 3년 전 | 4402 | ||
| 2574 | 10개월 전 | 559 | ||
| 2573 | 10개월 전 | 936 | ||
| 2572 |
두리삼촌v
|
10개월 전 | 606 | |
| 2571 | 10개월 전 | 554 | ||
| 2570 | 10개월 전 | 598 | ||
| 2569 |
두리삼촌v
|
10개월 전 | 635 | |
| 2568 |
두리삼촌v
|
10개월 전 | 665 | |
| 2567 |
두리삼촌v
|
10개월 전 | 459 | |
| 2566 |
두리삼촌v
|
10개월 전 | 441 | |
| 2565 | 10개월 전 | 738 | ||
| 2564 | 10개월 전 | 666 | ||
| 2563 | 10개월 전 | 472 | ||
| 2562 | 10개월 전 | 1028 | ||
| 2561 |
|
10개월 전 | 674 | |
| 2560 | 10개월 전 | 917 | ||
| 2559 | 10개월 전 | 655 | ||
| 2558 |
|
10개월 전 | 503 | |
| 2557 | 10개월 전 | 656 | ||
| 2556 | 10개월 전 | 953 | ||
| 2555 | 11개월 전 | 1334 | ||
| 2554 | 11개월 전 | 750 | ||
| 2553 |
|
11개월 전 | 744 | |
| 2552 | 11개월 전 | 673 | ||
| 2551 | 11개월 전 | 863 | ||
| 2550 | 11개월 전 | 764 | ||
| 2549 |
|
11개월 전 | 716 | |
| 2548 | 11개월 전 | 1028 | ||
| 2547 | 11개월 전 | 669 | ||
| 2546 | 11개월 전 | 1203 | ||
| 2545 | 11개월 전 | 660 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기