|
Post by CrAzY_J on Nov 3, 2004 14:55:54 GMT -8
This should be on code support and u should wait for Naruto cause i dont know if nybody can mess with his code
|
|
100%
|
Post by Aaron on Nov 3, 2004 18:24:21 GMT -8
Here you go, just tested and it works: <style type="text/css"> <!-- .pmbar { background-color: #444444; background-image: url(URL); background-repeat: repeat; } //--> </style>
<script type="text/javascript"> <!-- /* Hi-Tech PM Bar v.1 Created by Naruto hatakeforum.proboards30.com/index.cgi This code cannot be posted without the creator's permission */
// 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(/<br>(.+?)m/i)) { var Date = RegExp.$1 } if(TD[2].innerHTML.match(/<\/a>,\s(\d+)\s/i)) { var NewPM = RegExp.$1 } if(TD[2].innerHTML.match(/action=im">(\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="pmbar"; PMBar.style.padding="3";
if(TD[2].innerHTML.match(/Welcome Guest/i)) { PMBar.innerHTML="<center>( <a href='index.cgi?action=login'>Login</a> | <a href='index.cgi?action=register'>Register</a> )</center>"; } else if(TD[2].innerHTML.match(/, 0 are new./i)) { PMBar.innerHTML="<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td align='left'><font color='"+BeforeFlash+"'>»</font> <a href=javascript:Click(\"pm\");>Check PMs</a> <font color='"+BeforeFlash+"' size='1'>No New</font></td><td align='right'><font color='"+BeforeFlash+"'size='1'>"+Date+"m</font></td></tr></table>"; } else { PMBar.innerHTML="<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td align='left'><div id=\"flashtext\" name=\"flash0\">» <a href=javascript:Click(\"pm\");>Check PMs</a> <font size='1'>New</font></div></td><td align='right'><font color='"+BeforeFlash+"'size='1'>"+Date+"m</font></td></tr></table>"; 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=im'>"+NewPM+"</a></font></td><td align='right'><font size='1'>[ <a href='index.cgi?action=im'>Inbox</a> ] [ <a href='index.cgi?action=im&view=outbox'>Outbox</a> ] [ <a href='index.cgi?action=imsend'>Compose</a> ] [ <a href='index.cgi?action=imprefs'>Preferences</a> ]</font></td></tr></table>"; //--> </script>
|
|
Mary7
New Member
Posts: 4
|
Post by Mary7 on Nov 4, 2004 9:26:51 GMT -8
*FAINTS!* Thank you SO very much, Naruto!
|
|
100%
|
Post by Aaron on Nov 4, 2004 14:36:25 GMT -8
No problem ;]
|
|
|
Post by maxpower57 on Dec 20, 2004 8:23:10 GMT -8
nice code,
problem: ------------------------------------- i put it in all my headers, and it works, on the main page but then i go to a board and it says i have new pm's, so i click on it and it says: Total PMs: undefined - New: undefined
------------------------------------- whats that about?
|
|
100%
|
Post by Aaron on Dec 20, 2004 9:00:11 GMT -8
You probably have a code interfering with this one. You can try to place this code at the very top of your headers. Please give the url to your board so I can see the error.
|
|
|
Post by maxpower57 on Dec 20, 2004 9:22:27 GMT -8
You probably have a code interfering with this one. You can try to place this code at the very top of your headers. Please give the url to your board so I can see the error. okay oving it to the top worked ;Dthanks
|
|
100%
|
Post by Aaron on Dec 20, 2004 16:03:55 GMT -8
No problem. Glad you got it working.
|
|
|
Post by ritual on Dec 22, 2004 16:48:18 GMT -8
it works great!!! I use both firefox and IE and no problems for me. BUT...
I've had some members who say they now can access their pm area because of some java error. I've gone through the basics of their java setup and couldnt find a problem there. Help anyone??
|
|
Zio
New Member
Posts: 3
|
Post by Zio on Jan 30, 2005 13:29:05 GMT -8
nice code ;D. i had that same problem, thanks for the advice.. its working now yay.. lol
|
|