Post by Schnooble on Dec 26, 2006 0:23:03 GMT
Main Header
This adds a simple Pm bar below the menu bar
This adds a simple Pm bar below the menu bar
<script type='text/javascript'>
<!--
/*Pm Bar below Menu By Schnooble*/
/* ==:: Edit These ::== */
var forumName ='Message Board'; // forum name
var pmRowBg =''; // background of pmbar
var pmHeight ='25px'; // height of pmbar
/* ==:: Only Edit If You Know What You're Doing ::== */
var guestText ='Welcome to '+forumName+' , Please <a href="/index.cgi?action=login">Login</a> or <a href="/index.cgi?action=register">Register</a>';
var newPm ='<a href="/index.cgi?action=viewprofile&user='+pb_username+'">'+pb_displayname+'</a> , You have '+newPms+' new Personal Messages. :: <a href="/index.cgi?action=pm">Read</a> ::';
var noPm ='<a href="/index.cgi?action=viewprofile&user='+pb_username+'">'+pb_displayname+'</a> , You have no new Personal Messages';
/* ==:: No More Editing Below This Line ::== */
document.body.innerHTML.match(/hey, .*, you have <.*>(.*) messages?.*?, (\d+,\d+|\d+) (are|is) new/i)
var newPms= RegExp.$2
var pmLine = document.getElementsByTagName("table")[3];
var pmRow = pmLine.insertRow(1);
var pmCell = pmRow.insertCell(0);
pmCell.style.backgroundImage = 'url("'+pmRowBg+'")';
pmCell.height =''+pmHeight+'';
pmCell.className ='catbg';
pmCell.align ='center';
if(pb_username == 'Guest'){
pmCell.innerHTML +='<font size="1">'+guestText+'</font>';}else{
if(newPms == 0){
pmCell.innerHTML +='<font size="1">'+noPm+'</font>';}else{
pmCell.innerHTML +='<font size="1">'+newPm+'</font>';};}
//-->
</script>