p

갤러리 스킨에서 그림 다운로드 못하게 하려면?

· 2006-03-30 (목) 13:50:45 · 2449 · 6
갤러리 게시판에서 리스트에서 오른쪽클릭 금지 테그는 아는데
그림을 클릭하면 원본새창이 뜨잖아요 그 창에서 오른쪽 클릭해서 다운로드 받아버리는데
그거 못하게 하는 소스좀 알려 주십시요
|

댓글 6개

js/common.js 파일의 273번라인부근에보시면 테이블이 있습니다..

oncontextmenu='return false' onselectstart='return false' ondragstart='return false'

위소스를 넣어주세요...^^
그누보드 3 버젼인데요?
앗...그렇군요....그누4인줄알고 ... 죄송합니다...^^

자바스크립트 파일 찾아보시면 비슷하게 구현되어있지 않을까요?
2006-03-30 (목) 15:26:28
해당 스킨의 gbview.skin.php의 상단에 스크립트 부분
<script language="JavaScript">
<!--
function image_window2(src)
{
var img = src.src;
var tmp_w = w = src.tmp_width;
var tmp_h = h = src.tmp_height;

winl = (screen.width-w)/2;
wint = (screen.height-h)/3;

if (w >= screen.width) {
winl = 0;
w = screen.width - 10;
h = (parseInt)(w * (h / w));
}

if (h >= screen.height) {
wint = 0;
h = screen.height - 80;
w = (parseInt)(h * (w / h));
}

var settings ='width='+w+',';
settings +='height='+h+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars=no,';
settings +='resizable=no,';
settings +='status=no';

win=window.open("","newWindow",settings);
win.document.open();
win.document.write ("<html><head><meta http-equiv='content-type' content='text/html; charset=euc-kr'>");
win.document.write ("<title>이미지 보기</title></head>");
win.document.write ("<body leftmargin=0 topmargin=0>");
win.document.write ("<img src='"+img+"' width='"+w+"' height='"+h+"'border=0 onclick='window.close();' style='cursor:hand'>");
win.document.write ("</body></html>");
win.document.close();

if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
//-->
</script>
에서
win.document.write ("<body leftmargin=0 topmargin=0>"); 를

win.document.write ("<body leftmargin=0 topmargin=0 oncontextmenu='return false' onselectstart='return false' ondragstart='return false'>");

로 바꾸어 보세요~~~~~
답변 고맙습니다.
그런데 안돼네요 - -;;
2006-03-30 (목) 21:49:43
리스트에서 새창입니까?......
그렇다면 해당 부분의 소스 좀 올려 주세요~~~
댓글을 작성하시려면 로그인이 필요합니다.

그누3질답

9,564건
+
제목 글쓴이 날짜 조회
06-04-05 조회 2,266
06-04-05 조회 2,533
06-04-04 조회 2,398
06-04-04 조회 2,251
06-04-02 조회 2,207
06-03-31 조회 2,108
06-03-31 조회 2,680
06-03-30 조회 2,450
06-03-29 조회 2,284
06-03-26 조회 2,083
06-03-26 조회 2,247
06-03-26 조회 3,094
06-03-25 조회 2,006
06-03-24 조회 2,277
06-03-24 조회 2,294
06-03-24 조회 2,087
06-03-21 조회 2,702
06-03-20 조회 2,383
06-03-19 조회 2,606
06-03-18 조회 2,338