我是疯子 我怕谁?

所有的东西都是乱弹和自己的技术积累和网络见闻

悄悄话 msn风格 for vbb3

tcsm | 24 二月, 2005 22:24

编辑 navbar 模板:
搜索:

<!-- / NAVBAR POPUP MENUS -->

在下面添加:
<!--CCF New Private Message Popup-->
<div>
<if condition="$bbuserinfo[pmunread] >=1">
<script type="text/javascript" src="clientscript/ccf_pmpopup.js"></script>
<div id="popupWin" style="display:none; background:#E0E9F8; border-right:1px solid #455690; border-bottom:1px solid #455690; border-left:1px solid #B9C9EF; border-top:1px solid #B9C9EF; position:absolute; z-index:9999; width:230px; height:100px; left:15px; bottom:15px;" onselectstart="return false;" onmousedown="return popupWinespopup_DragDrop(event);" >
<div id="popupWin_header" style="cursor:default; display:none; position:absolute; left:2px; width:224px; top:2px; height:14px; filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#FFE0E9F8', EndColorStr='#FFFFFFFF');font:12px arial,sans-serif; color:#1F336B; text-decoration:none;">
  <span id="popupWintitleEl">提 示: </span>
<span style="position:absolute; right:0px; top:0px; cursor:pointer; color:#728EB8; font:bold 12px arial,sans-serif; position:absolute; right:3px;" onclick="popupWinespopup_Close()" onmousedown="event.cancelBubble=true;" onmouseover="style.color='#455690';" onmouseout="style.color='#728EB8';">X</span>
</div>
<div id="popupWin_content" onmousedown="event.cancelBubble=true;" style="line-height: 120%; display:none; border-left:1px solid #728EB8; border-top:1px solid #728EB8; border-bottom:1px solid #B9C9EF; border-right:1px solid #B9C9EF; background:#E0E9F8; padding:10px; overflow:hidden; text-align:center; filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#FFE0E9F8', EndColorStr='#FFFFFFFF');position:absolute; left:2px; width:204px; top:20px; height:56px;">
<span style="color:#1F336B; font:12px arial,sans-serif;">您有<FONT color=#ff0000>$vbphrase[unread_x_nav_compiled]</FONT>的悄悄话。</span><br/>
<a style="font:12px arial,sans-serif; color:#1F336B;" onmouseover="style.textDecoration='underline';" onmouseout="style.textDecoration='none';" href="./private.php?" id="popupWinaCnt">在当前窗口阅读</a><br/>
<a style="font:12px arial,sans-serif; color:#1F336B;" onmouseover="style.textDecoration='underline';" onmouseout="style.textDecoration='none';" href="./private.php?" id="popupWinaCnt" target="_blank">点击这里开新窗口阅读</a>
</div>
</div>
</if>
</div>
<!--/CCF New Private Message Popup-->

同样修改 pm_popup_script 模板,把里面所有的内容替换为上面的内容!
复制下面内容到里面为 ccf_pmpopup.js 后复制到论坛的 clientscript 目录里就 OK

/*======================================================================*
&line;&line; #################################################################### &line;&line;
&line;&line; # CCF New Private Message Popup Ooops # &line;&line;
&line;&line; # ---------------------------------------------------------------- # &line;&line;
&line;&line; # Copyright 1999-2004 Classiclub Forum All Rights Reserved. # &line;&line;
&line;&line; # ------------------------ aLWayS CLASSiC ------------------------ # &line;&line;
&line;&line; #################################################################### &line;&line;
*======================================================================*/
//<![CDATA[
var popupWinoldonloadHndlr=window.onload, popupWinpopupHgt, popupWinactualHgt, popupWintmrId=-1, popupWinresetTimer;
var popupWintitHgt, popupWincntDelta, popupWintmrHide=-1, popupWinhideAfter=3000, popupWinhideAlpha, popupWinhasFilters=true;
var popupWinnWin, popupWinshowBy=null, popupWindxTimer=-1, popupWinpopupBottom;
var popupWinnText,popupWinnMsg,popupWinnTitle,popupWinbChangeTexts=false;
window.onload=popupWinespopup_winLoad;

var popupWinoldonscrollHndr=window.onscroll;
window.onscroll=popupWinespopup_winScroll;
popupWinnText="";

function popupWinespopup_winScroll()
{
if (popupWinoldonscrollHndr!=null) popupWinoldonscrollHndr();
if (popupWintmrHide!=-1)
{
el=document.getElementById('popupWin');
el.style.display='none'; el.style.display='block';
}
}

function popupWinespopup_ShowPopup(show)
{
if (popupWindxTimer!=-1) { el.filters.blendTrans.stop(); }

if ((popupWintmrHide!=-1) && ((show!=null) && (show==popupWinshowBy)))
{
clearInterval(popupWintmrHide);
popupWintmrHide=setInterval(popupWinespopup_tmrHideTimer,popupWinhideAfter);
return;
}
if (popupWintmrId!=-1) return;
popupWinshowBy=show;

elCnt=document.getElementById('popupWin_content')
elTit=document.getElementById('popupWin_header');
el=document.getElementById('popupWin');
el.style.left='15';
el.style.top='';
el.style.filter='';

if (popupWintmrHide!=-1) clearInterval(popupWintmrHide); popupWintmrHide=-1;

document.getElementById('popupWin_header').style.display='none';
document.getElementById('popupWin_content').style.display='none';

if (navigator.userAgent.indexOf('Opera')!=-1)
el.style.bottom=(document.body.scrollHeight*1-document.body.scrollTop*1
-document.body.offsetHeight*1+1*popupWinpopupBottom)+'px';

if (popupWinbChangeTexts)
{
popupWinbChangeTexts=false;
document.getElementById('popupWinaCnt').innerHTML=popupWinnMsg;
document.getElementById('popupWintitleEl').innerHTML=popupWinnTitle;
}

popupWinactualHgt=0; el.style.height=popupWinactualHgt+'px';
el.style.visibility='';
if (!popupWinresetTimer) el.style.display='';
popupWintmrId=setInterval(popupWinespopup_tmrTimer,(popupWinresetTimer?1000:20));
}

function popupWinespopup_winLoad()
{
if (popupWinoldonloadHndlr!=null) popupWinoldonloadHndlr();

elCnt=document.getElementById('popupWin_content')
elTit=document.getElementById('popupWin_header');
el=document.getElementById('popupWin');
popupWinpopupBottom=el.style.bottom.substr(0,el.style.bottom.length-2);

popupWintitHgt=elTit.style.height.substr(0,elTit.style.height.length-2);
popupWinpopupHgt=el.style.height;
popupWinpopupHgt=popupWinpopupHgt.substr(0,popupWinpopupHgt.length-2); popupWinactualHgt=0;
popupWincntDelta=popupWinpopupHgt-(elCnt.style.height.substr(0,elCnt.style.height.length-2));

if (true)
{
popupWinresetTimer=true;
popupWinespopup_ShowPopup(null);
}
}

function popupWinespopup_tmrTimer()
{
el=document.getElementById('popupWin');
if (popupWinresetTimer)
{
el.style.display='';
clearInterval(popupWintmrId); popupWinresetTimer=false;
popupWintmrId=setInterval(popupWinespopup_tmrTimer,20);
}
popupWinactualHgt+=5;
if (popupWinactualHgt>=popupWinpopupHgt)
{
popupWinactualHgt=popupWinpopupHgt; clearInterval(popupWintmrId); popupWintmrId=-1;
document.getElementById('popupWin_content').style.display='';
if (popupWinhideAfter!=-1) popupWintmrHide=setInterval(popupWinespopup_tmrHideTimer,popupWinhideAfter);
}
if (popupWintitHgt<popupWinactualHgt-6)
document.getElementById('popupWin_header').style.display='';
if ((popupWinactualHgt-popupWincntDelta)>0)
{
elCnt=document.getElementById('popupWin_content')
elCnt.style.display='';
elCnt.style.height=(popupWinactualHgt-popupWincntDelta)+'px';
}
el.style.height=popupWinactualHgt+'px';
}

function popupWinespopup_tmrHideTimer()
{
clearInterval(popupWintmrHide); popupWintmrHide=-1;
el=document.getElementById('popupWin');
if (popupWinhasFilters)
{
backCnt=document.getElementById('popupWin_content').innerHTML;
backTit=document.getElementById('popupWin_header').innerHTML;
document.getElementById('popupWin_content').innerHTML='';
document.getElementById('popupWin_header').innerHTML='';
el.style.filter='blendTrans(duration=1)';
el.filters.blendTrans.apply();
el.style.visibility='hidden';
el.filters.blendTrans.play();
document.getElementById('popupWin_content').innerHTML=backCnt;
document.getElementById('popupWin_header').innerHTML=backTit;

popupWindxTimer=setInterval(popupWinespopup_dxTimer,1000);
}
else el.style.visibility='hidden';
}

function popupWinespopup_dxTimer()
{
clearInterval(popupWindxTimer); popupWindxTimer=-1;
}

function popupWinespopup_Close()
{
if (popupWintmrId==-1)
{
el=document.getElementById('popupWin');
el.style.filter='';
el.style.display='none';
if (popupWintmrHide!=-1) clearInterval(popupWintmrHide); popupWintmrHide=-1;

}
}

function popupWinespopup_ShowWindow()
{

if (popupWinnWin!=null) popupWinnWin.close();
popupWinnWin=window.open('','popupWinnWin','width=300,height=200,scrollbars=no, '+
'menubar=no, resizable=no, status=no, toolbar=no, location=no');
popupWinnWin.document.write(popupWinnText);
}

var popupWinmousemoveBack,popupWinmouseupBack;
var popupWinofsX,popupWinofsY;
function popupWinespopup_DragDrop(e)
{
popupWinmousemoveBack=document.body.onmousemove;
popupWinmouseupBack=document.body.onmouseup;
ox=(e.offsetX==null)?e.layerX:e.offsetX;
oy=(e.offsetY==null)?e.layerY:e.offsetY;
popupWinofsX=ox; popupWinofsY=oy;

document.body.onmousemove=popupWinespopup_DragDropMove;
document.body.onmouseup=popupWinespopup_DragDropStop;
if (popupWintmrHide!=-1) clearInterval(popupWintmrHide);
}

function popupWinespopup_DragDropMove(e)
{
el=document.getElementById('popupWin');
if (e==null&&event!=null)
{
el.style.left=(event.clientX*1+document.body.scrollLeft-popupWinofsX)+'px';
el.style.top=(event.clientY*1+document.body.scrollTop-popupWinofsY)+'px';
event.cancelBubble=true;
}
else
{
el.style.left=(e.pageX*1-popupWinofsX)+'px';
el.style.top=(e.pageY*1-popupWinofsY)+'px';
e.cancelBubble=true;
}
if ((event.button&1)==0) popupWinespopup_DragDropStop();
}

function popupWinespopup_DragDropStop()
{
document.body.onmousemove=popupWinmousemoveBack;
document.body.onmouseup=popupWinmouseupBack;
}

//]]>



popupWinhideAfter=3000 中的3000代表3秒钟

 

评论

发表评论
 authimage
 
Accessible and Valid XHTML 1.0 Strict and CSS
Powered by LifeType - Design by BalearWeb