모질라에서 제로보드 사용시 서브레이어를 보기원한다면

SeaMonkey (구, Mozilla 1.x Application Suite) 사용에 대한 일반적인 질문과 답을 해 주는 게시판입니다. 질문을 하기 전에 FAQ를 읽어 보시는게 도움이 될 것입니다.
Locked
eoungoo
Posts: 0
Joined: 2003 04 01 10:45 21

모질라에서 제로보드 사용시 서브레이어를 보기원한다면

Post by eoungoo »

모질라,네스케이프에서 글잘성자를 클릭했을때 서브레이어 메뉴를 볼수있습니다.

이 팁은 다음 버젼에서 테스트 되었습니다.
    제로보드 배포버젼 : 4.1 pl 2 (2002. 6. 19)    
    네스케이프(netscape) : 7.02
    모질라(mozilla) : 1.3
    익스플로러(explore) : 6.0
    ** netscape 4.x 버전에서는 안됩니다.


1. script 디렉토리에 있는 script_zbLayer.php를 다음과 같이 바꾼다.
        <script language='JavaScript'>
        <!--
        var dom = (document.getElementById) ? true : false;
        var ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
        var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
        var ns4 = (document.layers && !dom) ? true : false;
        var ie4 = (document.all && !dom) ? true : false;
        var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;
        var offX = 12;
        var offY = 12;

        function ZB_layerAction(event,name,status) {
                var divobj, divsts;
                if (nodyn) return;
                divobj = (ns4) ? document.name.document: (ie4)? document.all[name]: (ie5||ns5)? document.getElementById(name): null;
                divsts = (ns4) ? document.name: divobj.style;
                var mouseX, mouseY, tpWd, tpHt, winWd, winHt;
                mouseX = (ns4||ns5) ? event.pageX: window.event.clientX + document.body.scrollLeft;
                mouseY = (ns4||ns5) ? event.pageY: window.event.clientY + document.body.scrollTop;
                tpWd = (ns4) ? divobj.width: (ie4||ie5) ? divobj.clientWidth: divobj.offsetWidth;
                tpHt = (ns4) ? divobj.height: (ie4||ie5) ? divobj.clientHeight: divobj.offsetHeight;
                winWd = (ns4||ns5) ? window.innerWidth - 20 + window.pageXOffset: document.body.clientWidth + document.body.scrollLeft;
                winHt = (ns4||ns5) ? window.innerHeight + window.pageYOffset: document.body.clientHeight + document.body.scrollTop;
                if((mouseX+offX+tpWd) > winWd)
                        divsts.left = (ns4) ? mouseX-(tpWd+offX) : mouseX-(tpWd+offX)+"px";
                else
                        divsts.left = (ns4) ? mouseX+offX : mouseX+offX+"px";
                if((mouseY+offY+tpHt) > winHt)
                        divsts.top = (ns4) ? mouseY-(tpHt+offY) : mouseY-(tpHt+offY)+"px";
                else
                        divsts.top = (ns4) ? mouseY+offY : mouseY+offY+"px";
                        
                if(ns4||ns5) {
                        divsts.left = mouseX - 13;
                        divsts.top = mouseY - 12;
                } else {
                        divsts.posLeft = mouseX - 13;
                        divsts.posTop = mouseY - 12;
                }

                if(status=='visible') {
                    if(divobj) {
                        divobj.visibility='hidden';
                        divobj=null;
                    }
                    divobj=divsts;
                }else{
                    divobj=null;
                }
                divsts.visibility=status;
        }

        function print_ZBlayer(name, homepage, mail, member_no, boardID, writer, traceID, traceType, isAdmin, isMember) {
                var printHeight = 0;
                var printMain="";
                if(homepage) {
                        printMain = "<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=window.open('"+homepage+"');><td style=font-family:굴림;font-size:9pt height=18 nowrap> <img src=images/n_homepage.gif border=0 align=absmiddle>  홈페이지  </td></tr>";
                        printHeight = printHeight + 16;
                }
                if(mail) {
                        printMain = printMain +        "<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=window.open('open_window.php?mode=m&str="+mail+"&str1="+writer+"','ZBremote','width=1,height=1,left=1,top=1');><td style=font-family:굴림;font-size:9pt height=18 nowrap> <img src=images/n_mail.gif border=0 align=absmiddle>  메일 보내기  </td></tr>";
                        printHeight = printHeight + 16;
                }
                if(member_no) {
                        if (isMember == 1) {    // 멤버일때만 회원정보보기가 가능함
                        if(isMember) {
                                printMain = printMain +        "<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=window.open('view_info.php?member_no="+member_no+"','view_info','width=400,height=510,toolbar=no,scrollbars=yes');><td style=font-family:굴림;font-size:9pt height=18 nowrap> <img src=images/n_memo.gif border=0 align=absmiddle>  쪽지 보내기  </td></tr>";
                                printHeight = printHeight + 16;
                        }
                        printMain = printMain +        "<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=window.open('view_info2.php?member_no="+member_no+"','view_info','width=400,height=510,toolbar=no,scrollbars=yes');><td style=font-family:굴림;font-size:9pt height=18 nowrap> <img src=images/n_information.gif border=0 align=absmiddle>  회원정보 보기  </td></tr>";
                        printHeight = printHeight + 16;
                        } // 멤버일때만 회원정보보기가 가능함 ;
                }
                if(writer) {
                        printMain = printMain +        "<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=location.href='zboard.php?id="+boardID+"&sn1=on&sn=on&ss=off&sc=off&keyword="+writer+"';><td style=font-family:굴림;font-size:9pt height=18 nowrap> <img src=images/n_search.gif border=0 align=absmiddle>  이름으로 검색  </td></tr>";
                        printHeight = printHeight + 16;
                }
                if(isAdmin) {
                        if(member_no) {
                                printMain = printMain +        "<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=window.open('open_window.php?mode=i&str="+member_no+"','ZBremote','width=1,height=1,left=1,top=1');><td style=font-family:굴림;font-size:9pt height=18 nowrap> <img src=images/n_modify.gif border=0 align=absmiddle>  <font color=darkred>회원정보 변경  </td></tr>";
                                printHeight = printHeight + 16;
                        }
                        printMain = printMain +        "<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=window.open('open_window.php?mode="+traceType+"&str="+traceID+"','ZBremote','width=1,height=1,left=1,top=1');><td style=font-family:굴림;font-size:9pt height=18 nowrap> <img src=images/n_relationlist.gif border=0 align=absmiddle>  <font color=darkred>관련글 추적</font>  </td></tr>";
                        printHeight = printHeight + 16;
                
                }
                var printHeader = "<div id='"+name+"' style='position:absolute; left:10px; top:25px; width:127; height: "+printHeight+"; z-index:1; visibility: hidden' onMousedown=ZB_layerAction(event,'"+name+"','hidden')><table border=0><tr><td colspan=3 onMouseover=ZB_layerAction(event,'"+name+"','hidden') height=3></td></tr><tr><td width=5 onMouseover=ZB_layerAction(event,'"+name+"','hidden') rowspan=2> </td><td height=5></td></tr><tr><td><table style=cursor:hand border='0' cellspacing='1' cellpadding='0' bgcolor='black' width=100% height=100%><tr><td valign=top bgcolor=white><table border=0 cellspacing=0 cellpadding=3 width=100% height=100%>";
                var printFooter = "</table></td></tr></table></td><td width=5 rowspan=2 onMouseover=ZB_layerAction(event,'"+name+"','hidden')> </td></tr><tr><td colspan=3 height=10 onMouseover=ZB_layerAction(event,'"+name+"','hidden')></td></tr></table></div>";
        
                document.writeln(printHeader+printMain+printFooter);
        }
        //-->        
        </script>

2. view.php 파일에있는 onMousedown시에 호출되는 javascript 함수부분에 event를 추가한다.
   view.php에는 수정할 부분이 3군데 있다.
    수정전 : onMousedown="ZB_layerAction('zbLayer$_zbCheckNum','visible')
    수정후 : onMousedown="ZB_layerAction(event,'zbLayer$_zbCheckNum','visible') => event, 를 추가함

3. include 디렉토리에 있는 list_check.php에도 2번 처럼 event를 추가한다.
        수정전 : onMousedown="ZB_layerAction('zbLayer$_zbCheckNum','visible')"
        수정후 : onMousedown="ZB_layerAction(event,'zbLayer$_zbCheckNum','visible')" => event, 를 추가함
닭발은세개

Re: 모질라에서 제로보드 사용시 서브레이어를 보기원한다면

Post by 닭발은세개 »

이 해결책의 가장 큰 문제는 게시판에 읽을 때 리스트 보기 옵션이 체크되어 있다면 글읽기 하단에 출력되는
리스트에서 서브레이어를 클릭하면 레이어가 브라우저마다 조금씩 다르긴 하지만 전혀 엉뚱한 곳에서 보이는
문제가 있습니다. 참고하세요. ㅡㅡ; 저도 적용은 했는데 영~ 찜찜하네욤...
닭발은세개

Re: 모질라에서 제로보드 사용시 서브레이어를 보기원한다면

Post by 닭발은세개 »

아 그리고 추가적으로 게시판을 Div 태그로 작업하면
위치가 아예 엉뚱한 곳으로 가 버리더군요.
테이블 태그로 하면 괜찮구요.
이제 제로보드가 수명이 다했는지 정보 얻을만한 곳도 없고... 에휴...
Locked

Who is online

Users browsing this forum: No registered users and 5 guests