100%
|
Post by Aaron on May 27, 2005 14:41:13 GMT -8
Hi-Tech PM Bar v.1For use on ProBoards version 4.[ Cross - Browser ] Preview: HereGlobal Header: <script type="text/javascript"> <!-- /* Hi-Tech PM Bar v.1 Created by Naruto hatakeforum.proboards30.com/index.cgi */
// First flash color - Darker color than AfterFlash var BeforeFlash = "#666666"; // Second flash color - Lighter color than BeforeFlash var AfterFlash = "#999999";
function Click(pm) { var Function = document.getElementById(pm); if (Function.parentNode.style.display=="none") { Function.parentNode.style.display=""; } else { Function.parentNode.style.display="none"; } } function flash(name) { if (name=="flash0") { document.getElementById("flashtext").style.color=""+BeforeFlash+""; document.getElementById("flashtext").name="flash1"; } else { document.getElementById("flashtext").style.color=""+AfterFlash+""; document.getElementById("flashtext").name="flash0"; } setTimeout("flash(document.getElementById('flashtext').name)",500) } var td = document.getElementsByTagName("td"); if(td[2].innerHTML.match(/<\/a>,\s(\d+)\s/i)) { var NewPM = RegExp.$1 } if(td[2].innerHTML.match(/action=pm">(\d+)\s/i)) { var TotalPM = RegExp.$1 } var PMBar = document.getElementsByTagName("table")[0].insertRow(2).insertCell(0); var PMBar2 = document.getElementsByTagName("table")[0].insertRow(3).insertCell(0); PMBar.className="windowbg"; PMBar.style.padding="3"; if(td[2].innerHTML.match(/Welcome Guest/i)) { PMBar.innerHTML="<font size='1'><b>Welcome Guest</b> ( <a href='index.cgi?action=login'>Login</a> | <a href='index.cgi?action=register'>Register</a> )</font>"; } else if(td[2].innerHTML.match(/, 0 are new./i)) { PMBar.innerHTML="<font color='"+BeforeFlash+"' size='1'>»</font><font size='1'> <a href=javascript:Click(\"pm\");>Check PMs</a> </font><font color='"+BeforeFlash+"' size='1'>No New</font>"; } else { PMBar.innerHTML="<div id=\"flashtext\" name=\"flash0\"><font size='1'>» <a href=javascript:Click(\"pm\");>Check PMs</a> <font size='1'>New</font></font></div>"; flash(document.getElementById("flashtext").name); } PMBar2.className="windowbg2"; PMBar2.style.padding="3"; PMBar2.id="pm"; PMBar2.parentNode.style.display="none"; PMBar2.innerHTML="<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td><font size='1'>Total PMs: "+TotalPM+" - New: <a href='index.cgi?action=pm'>"+NewPM+"</a></font></td><td align='right'><font size='1'>[ <a href='index.cgi?action=pm'>Inbox</a> ] [ <a href='index.cgi?action=pm&view=2'>Outbox</a> ] [ <a href='index.cgi?action=pmsend'>Compose</a> ] [ <a href='index.cgi?action=pmprefs'>Preferences</a> ]</font></td></tr></table>"; //--> </script>
#nosmileys#nosmileys
Last Edit: May 27, 2005 14:52:23 GMT -8 by Aaron
|
|
|
Post by SonicX on May 27, 2005 14:44:26 GMT -8
Kool code Naruto!!!
|
|
100%
|
Post by Aaron on May 27, 2005 15:06:29 GMT -8
Thanks. I didn't have to do much, just recode the one that worked on PBv3.
|
|
|
Post by CrAzY_J on May 29, 2005 7:37:14 GMT -8
What do you have to recode really? everything is in the same td's and the same tables
|
|
100%
|
Post by Aaron on May 29, 2005 7:57:29 GMT -8
Not much =P
Basically I changed all the links to the proper ones on PBv4. It used to be action=im but now it's action=pm.
|
|
|
Post by Sephiroth on Jun 4, 2005 5:15:35 GMT -8
hEY... How do i put a grad on it?
|
|
|
Post by merovingian on Jun 4, 2005 6:11:17 GMT -8
i have a few questions naruto, first is there a way that i can get that PM bar above the menu icons and then is there a way i get fix the "undefined" to the persons name?
|
|
100%
|
Post by Aaron on Jun 4, 2005 8:06:53 GMT -8
Sephiroth:
Replace this line:
PMBar.className="windowbg";
With:
PMBar.className="pmbg";
And add this code to your global headers:
<style type="text/css"> <!-- .pmbg { background-image: url(IMGURLHERE); } //--> </style>
merovingian:
There shouldn't be an undefined for the persons name.. Try putting the code at the very top of the global header.
The PM bar wouldn't work if it was above the menu icons.. when it expands it would look messed up.
|
|
|
Post by merovingian on Jun 4, 2005 8:32:34 GMT -8
ok ill try it ok now it works Thanks!
|
|
100%
|
Post by Aaron on Jun 4, 2005 8:48:56 GMT -8
Yup, no problem.
|
|