This mod will create a "lightbox" New PM notification.
NOTE: This modification requires that "notify me on new private messages" be enabled in your UCP.
[slide]http://imgcentre.com/img/uploads/big/39cf905e8f.png[/slide]
1) Download RokBox STANDALONE:
2) Upload the folder "rokbox" from the zip file to your "public_html" root folder.
3)
IN: Overall_header.html
Find and REMOVE:
Find:
Add BEFORE:
Find:
In-Line, add After:
Find:
Add Before:
IN: Overall_Footer.html
Find:
Add BEFORE:
ok.
Create a new file in /styles/myTemplate/template called "newPM.html" and paste the following
into it, or create your own:
PURGE CACHE. DONE.
CUSTOMIZING:
To change the color of the lightbox, the rokbox theme path must be changed:
Dark:
Light:
To change the layout of the alert, simply edit "/styles/myTheme/Template/newPM.html"
This modification uses MooTools. More modifications will be added by me to further use these tools.
NOTE: This modification requires that "notify me on new private messages" be enabled in your UCP.
[slide]http://imgcentre.com/img/uploads/big/39cf905e8f.png[/slide]
1) Download RokBox STANDALONE:
Code:
[URL]http://rocketwerx.com/products/rokbox/download[/URL]
3)
IN: Overall_header.html
Find and REMOVE:
Code:
<!-- IF S_USER_PM_POPUP -->
if ({S_NEW_PM})
{
var url = '{UA_POPUP_PM}';
window.open(url.replace(/&/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400');
}
<!-- ENDIF -->
Code:
</head>
Code:
<script type="text/javascript" src="rokbox/mootools-release-1.11.js"></script>
<script type="text/javascript" src="rokbox/rokbox.js"></script>
<link href="rokbox/themes/dark/rokbox-style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="rokbox/themes/light/rokbox-config.js"></script>
Code:
<body
Code:
onload="<!-- IF S_DISPLAY_PM -->clickElement('myclicker')<!-- ENDIF -->"
Code:
<div id="wrap">
Code:
<!-- IF S_DISPLAY_PM -->
<a id="myclicker" rel="rokbox[320 40][module=privmsg]" href="#" title="" accesskey="l"></a>
<!-- ENDIF -->
Find:
Code:
</body>
Code:
<!-- IF S_DISPLAY_PM -->
<!-- INCLUDE newPM.html -->
<script type="text/javascript">
function clickElement(elementid){
if ({S_NEW_PM})
{
var e = document.getElementById(elementid);
if (typeof e == 'object') {
/*if(typeof e.click != 'undefined') {
e.click();
alert('click');
return false;
}
else */
if(document.createEvent) {
var evObj = document.createEvent('MouseEvents');
evObj.initEvent('click',true,true);
e.dispatchEvent(evObj);
return false;
}
else if(document.createEventObject) {
e.fireEvent('onclick');
alert('createEventObject');
return false;
}
else {
e.click();
alert('click');
return false;
}
}
}
}
</script>
<!-- ENDIF -->
Create a new file in /styles/myTemplate/template called "newPM.html" and paste the following
into it, or create your own:
Code:
<style type="text/css">
#privmsg {display: none;}
</style>
<div id="privmsg">
<center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="padding-left: 6px;">
You have a new message. Would you like to read it?
</td>
</tr>
</table>
<br />
<a href="ucp.php?i=pm&folder=inbox"><button type="button">Yes</button></a>
<a href="#" onClick="javascript:rokbox.close()"><button type="button">No</button></a>
</center>
</div>
CUSTOMIZING:
To change the color of the lightbox, the rokbox theme path must be changed:
Dark:
Code:
<link href="rokbox/themes/dark/rokbox-style.css" rel="stylesheet" type="text/css" />
Code:
<link href="rokbox/themes/light/rokbox-style.css" rel="stylesheet" type="text/css" />
This modification uses MooTools. More modifications will be added by me to further use these tools.