그누순정 55832 버전 이상입니다.
아래의 코드를 적은 후 그 php 파일을 이름은 아무거나 주고 extend 디렉토리로 업로드해 주세요.
관리자는 우클릭이 가능하고 나머지는 우클릭을 금지합니다.
[code]
<?php
if (!defined('_GNUBOARD_')) exit;
add_event('tail_sub', function() {
global $is_admin;
if (!$is_admin) echo "<script>document.oncontextmenu = document.onselectstart = document.ondragstart = () => { return false; }</script>";
});
[/code]
----------
개인적으로 https://sir.kr/g5_tip/22905 웹폰트와 함께 붙여서 아래처럼 사용하고 있습니다.
[code]
<?php
if (!defined('_GNUBOARD_')) exit;
add_event('tail_sub', function() {
echo "
<style>
@font-face { font-family:'NEXON Lv1 Gothic OTF'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@2.1/NEXON Lv1 Gothic OTF.woff') format('woff'); }
div, span, table, p, input, textarea, button, select, code, h1, h2, h3 { font-family:'NEXON Lv1 Gothic OTF' !important; }
</style>
";
global $is_admin;
if (!$is_admin) echo "<script>document.oncontextmenu = document.onselectstart = document.ondragstart = () => { return false; }</script>";
});
[/code]
----------
[ 추가사항 ]
생각해보니 글쓰는 사람이 write 모드에서 우클릭이 잠겨 있으면 좀 이상할 것 같네요.
그래서 글쓰기시에는 등급에 상관없이 우클릭을 개방한다는 조건까지 감안한다면 아래처럼요.
[code]
<?php
if (!defined('_GNUBOARD_')) exit;
add_event('tail_sub', function() {
global $is_admin;
$ok_mouse = $is_admin || basename($_SERVER['PHP_SELF']) === "write.php";
if (!$ok_mouse) echo "<script>document.oncontextmenu = document.onselectstart = document.ondragstart = () => { return false; }</script>";
});
[/code]
----------
[code]
<?php
if (!defined('_GNUBOARD_')) exit;
add_event('tail_sub', function() {
echo "
<style>
@font-face { font-family:'NEXON Lv1 Gothic OTF'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@2.1/NEXON Lv1 Gothic OTF.woff') format('woff'); }
div, span, table, p, input, textarea, button, select, code, h1, h2, h3 { font-family:'NEXON Lv1 Gothic OTF' !important; }
</style>
";
global $is_admin;
$ok_mouse = $is_admin || basename($_SERVER['PHP_SELF']) === "write.php";
if (!$ok_mouse) echo "<script>document.oncontextmenu = document.onselectstart = document.ondragstart = () => { return false; }</script>";
});
[/code]
----------
[ 스킨과의 연동 ] : https://sir.kr/g5_skin/60391
댓글 20개
게시글 목록
| 번호 | 제목 |
|---|---|
| 23254 | |
| 23244 | |
| 23241 | |
| 23236 | |
| 23200 | |
| 23199 | |
| 23179 | |
| 23174 | |
| 23138 | |
| 23128 | |
| 23125 | |
| 23116 | |
| 23109 | |
| 23099 | |
| 23092 | |
| 23083 | |
| 23079 | |
| 23063 | |
| 23050 | |
| 23036 | |
| 23029 | |
| 23007 | |
| 23003 | |
| 22983 | |
| 22959 | |
| 22943 | |
| 22939 | |
| 22934 | |
| 22905 | |
| 22897 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기