Post by bradderz on Mar 4, 2006 6:10:33 GMT -8
Forum URL: lotrevolution2.proboards24.com
Hello. I recently added a code to my forum that would display a PM bar.
I inserted the code below into the header of my global headers and footers.
The code seemed to malfunction, and didnt work, and minutes later, when I tried to delete it, I clicked headers and footers, and then global footers, and nothing showed up on the page, just my banner, and the affiliates box. I cant access any headers or footers, lol.
PLEASE help.
Many thanks - Bradderz.
Hello. I recently added a code to my forum that would display a PM bar.
I inserted the code below into the header of my global headers and footers.
<script type="text/javascript">
<!--
/*
Hi-Tech PM Bar v.1
Created by Naruto
http://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>";
//-->
The code seemed to malfunction, and didnt work, and minutes later, when I tried to delete it, I clicked headers and footers, and then global footers, and nothing showed up on the page, just my banner, and the affiliates box. I cant access any headers or footers, lol.
PLEASE help.
Many thanks - Bradderz.