Post by Smangii on Apr 4, 2007 16:39:36 GMT -5
SI Private Message Bar - Version 1
Created By: Smangii
Crossbrowser: Yes for FF and IE
Location: TOP of global headers
Preview: Click (Username: testbot | Password: insane)
Shortened Version of Code:
Long Version of Code:
Created By: Smangii
Crossbrowser: Yes for FF and IE
Location: TOP of global headers
Preview: Click (Username: testbot | Password: insane)
Shortened Version of Code:
<script src="http://smangii.ifastnet.com/codes/sipmbarv1.js">
/* SI PRIVATE MESSAGE BAR v1 - By Smangii
http://smangii.proboards78.com
Open Source with this header intact */
</script>
Long Version of Code:
<script>
/* SI PRIVATE MESSAGE BAR v1 - By Smangii
http://smangii.proboards78.com
Open Source with this header intact */
document.write('<table class="bordercolor" width="92%" align="center" cellpadding="4" cellspacing="1"><tr><td id="pm_info" align="center" class="windowbg"><div style="float:left">Welcome Guest</div><div style="float:right"><a href="/index.cgi?action=login">Login</a> | <a href="/index.cgi?action=register">Register</a> | <a href="/index.cgi?action=forgotpassword">Forgot Password?</a></div></td></tr></table>');
var td = document.getElementsByTagName("td");
var pb_time = document.getElementsByTagName("td")[2].getElementsByTagName("font")[0].innerHTML.split(/<br>/i)[1];
if(td[2].innerHTML.match(/you have <.+?>(.+?) (message|messages)<.+?>, (\d+) (are|is) new./i)){
var pm_info = document.getElementById("pm_info");
pm_info.innerHTML = '<div style="float:left">Welcome <a href="/index.cgi?action=modifyprofile&user='+pb_username+'">'+pb_displayname+'</a> (Inbox: <a href="/index.cgi?action=pm">'+RegExp.$3+' New</a> | '+RegExp.$1+' Old)</div><div style="float:right">Logged in as: <i>'+pb_username+'</i> | '+pb_time+'</div>';
}
</script>