發新話題
打印

龍哥一定要入

[Close]

龍哥一定要入

論壇走位問題
試下依個
=====================================
不能正常顯示 image 跳出視窗是 Discuz 6 的 bug, 可修改 include/javascript/common.js 在最底部加入
複製內容到剪貼板
代碼:

CODE:
var sPop = null;
document.write("<style type='text/css'>");
document.write(".cPopText { font-family: Tahoma, Verdana; background-color: #FFFFFF; border: 1px #666666 dotted; font-size: 12px; padding-right: 4px; padding-left: 4px; line-height: 18px; padding-top: 2px; padding-bottom: 2px; text-align:left;visibility: hidden; filter: Alpha(Opacity=80); opacity: 0.8;}");

document.write("</style>");
document.write("<div id='popLayer' style='position:absolute;z-index:1000' class='cPopText'></div>")

function showPopupText(event) {
        if(event.srcElement) o = event.srcElement; else o = event.target;
        if(!o) {
                return;
        }
        MouseX = event.clientX;
        MouseY = event.clientY;
        if(o.alt != null && o.alt != '') {
                o.pop = o.alt;
                o.alt = '';
        }
        if(o.title != null && o.title != '') {
                o.pop = o.title;
                o.title = '';
        }
        if(o.pop != sPop) {
                sPop = o.pop;
                if(sPop == null || sPop == '') {
                        $('popLayer').style.visibility = "hidden";
                } else {
                        popStyle = o.dyclass != null ? o.dyclass : 'cPopText';
                        $('popLayer').style.visibility = "visible";
                        showIt();
                }
        }
}

function showIt() {
        $('popLayer').className = popStyle;
        $('popLayer').innerHTML = sPop.replace(/</g,"<").replace(/>/g,">").replace(/\n/g,"<br>");
               
        var bodySL, bodyST;
        if(window.pageXOffset){
                bodySL=window.pageXOffset;
        }else if(document.documentElement&&document.documentElement.scrollLeft){
                bodySL=document.documentElement.scrollLeft;
        }else if(document.body){
                bodySL=document.body.scrollLeft; //author: meizz
        }
        
        if(window.pageYOffset){
                bodyST=window.pageYOffset;
        }else if(document.documentElement&&document.documentElement.scrollTop){
                bodyST=document.documentElement.scrollTop;
        }else if(document.body){
                bodyST=document.body.scrollTop;
        }
        
        var bodyCW, bodyCH;
        if(window.innerWidth){
                bodyCW=window.innerWidth;
        }else if(document.documentElement&&document.documentElement.clientWidth){
                bodyCW=document.documentElement.clientWidth;
        }else if(document.body){
                bodyCW=document.body.clientWidth; //author: meizz
        }
        
        if(window.innerHeight){
                bodyCH=window.innerHeight;
        }else if(document.documentElement&&document.documentElement.clientHeight){
                bodyCH=document.documentElement.clientHeight;
        }else if(document.body){
                bodyCH=document.body.clientHeight;
        }

        if($('popLayer').clientWidth>300){
                var popWidth = 300;
        }else{
                var popWidth = $('popLayer').clientWidth;
        }
        
        var popWidth = $('popLayer').clientWidth;
        var popHeight = $('popLayer').clientHeight;
        var popLeftAdjust = MouseX + 12 + popWidth > bodyCW ? -popWidth - 24 : 0;
        var popTopAdjust = MouseY + 12 + popHeight > bodyCH ? -popHeight - 24 : 0;
        $('popLayer').style.left = (MouseX + 12 + bodySL + popLeftAdjust) + 'px';
        $('popLayer').style.top = (MouseY + 12 + bodyST + popTopAdjust) + 'px';
}

if(!document.onmouseover) {
        document.onmouseover = function(e) {
                var event = e ? e : window.event;
                showPopupText(event);
        };
}
2. 對 xhtml 擁護者可將 images_css 模板中 <style type="text/css"> 至 </script> 中的內容 (不含此兩句) 剪貼到風格的 css 模板內, 再修改 images_index 模板將 {template images_css} 一句刪去, 然後到後台 "更新 css 緩存", 但不修改也不會影響正常使用
=====================================

再唔得係到講

TOP

=.=  對論壇有貢獻喎我  呵呵

TOP

發新話題