[問題]如何除去私人訊息的彈出式視窗?
發表於 : 2004-06-07 20:42
因為我的網站的其中一個目標就是無彈出式視窗,而phpbb在有新私人訊息時都會有它出現,我想把這個功能移除,可行嗎?
我用的是phpbb 2.0.8版本。
我用的是phpbb 2.0.8版本。
代碼: 選擇全部
UPDATE phpbb_users SET user_popup_pm = 0;代碼: 選擇全部
<tr>
<td class="row1"><span class="gen">{L_POPUP_ON_PRIVMSG}:</span><br /><span class="gensmall">{L_POPUP_ON_PRIVMSG_EXPLAIN}</span></td>
<td class="row2">
<input type="radio" name="popup_pm" value="1" {POPUP_PM_YES} />
<span class="gen">{L_YES}</span>
<input type="radio" name="popup_pm" value="0" {POPUP_PM_NO} />
<span class="gen">{L_NO}</span></td>
</tr>代碼: 選擇全部
templates/你的風格/overall_header.tpl代碼: 選擇全部
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">代碼: 選擇全部
<div id="pmsg" style="LEFT: 30px; TOP: 40px; POSITION: absolute"></div><br>代碼: 選擇全部
<!-- BEGIN switch_enable_pm_popup -->代碼: 選擇全部
<script LANGUAGE="JavaScript">
self.onError=null;
currentX = currentY = 0;
whichIt = null;
lastScrollX = 0; lastScrollY = 0;
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;
<!-- STALKER CODE -->
function heartBeat() {
if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }
if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
if(diffY != lastScrollY) {
percent = .1 * (diffY - lastScrollY);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) document.all.pmsg.style.pixelTop += percent;
if(NS) document.pmsg.top += percent;
lastScrollY = lastScrollY + percent;
}
if(diffX != lastScrollX) {
percent = .1 * (diffX - lastScrollX);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) document.all.pmsg.style.pixelLeft += percent;
if(NS) document.pmsg.left += percent;
lastScrollX = lastScrollX + percent;
}
}
if(NS || IE) action = window.setInterval("heartBeat()",1);
<!-- /STALKER CODE -->
</script>代碼: 選擇全部
if ( {PRIVATE_MESSAGE_NEW_FLAG} )
{
window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
}代碼: 選擇全部
Msg_Flag="{PRIVATE_MESSAGE_INFO}";
if ( Msg_Flag.charAt(4)=='b' )
{
//window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
var left = (screen.width - 260) / 2;
var top = (screen.height - 370) / 2;
var newMsg = "您收到了新的私人訊息<br><br>點選 <a href='privmsg.php?folder=inbox' onclick=DIV.style.display='none'>這裡</a> 進入私人訊息收件夾";
var showMsg='<Table borderColor=#d0e8ff cellSpacing=0 cellPadding=3 width=250 bgColor=#d0e8ff border=1 class="forumline">';
showMsg += '<TR><TD width="100%" bgColor=#d0e8ff align="center"><span class="gen"><font color=black>您有新的私人訊息</font></span>[color=#ff002a]<EMBED src="YouGotAMessage.wav" hidden="true"></EMBED>[/color]</TD></TR>';
showMsg += '<TR><TD bgColor="black" valign="top" class="row1" align="center"><span class="gen">' + newMsg + '</span></TD></TR>';
showMsg += '<TR><TD bgColor=#d0e8ff valign="top" align="center"><span class="gen"><input type="button" onclick=pmsg.style.display="none" value="關 閉"></span></TD></TR></Table>';
pmsg.innerHTML=showMsg;
pmsg.style.pixelTop=top;
pmsg.style.pixelLeft=left;
}
else
{
pmsg.innerHTML="";
}