Post by [HkK Rly] on Jun 20, 2005 19:26:49 GMT -8
<script launguage="JavaScript" type="text/JavaScript">
/*Pm and welcome table by maddenKING*/
var ttd=document.getElementsByTagName('td');
//edit the messages.
var newPmMessage="You have new private messages.";
var oldPmMessage="You have no new private messages.";
var guestMessage="Welcome, guest.";
//edit the news
var guestNews="Hello, guest. We hope you enjoy our site.";
var memberNews="Welcome, member.";
//edit the site name
var siteName="A Site";
//do not edit below this line
if(ttd[2].innerHTML.match(/guest/i)){
document.write('<table align="center" width="520" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" width="600"><tr><td class="titlebg"><center>Welcome Center</center></td></tr><tr><td class="catbg"><center><< Private Message Center >></center></td></tr><tr><td height="50" class="windowbg"><center>'+guestMessage+'<br /><a href="/index.cgi?action=login">Log In</a> | <a href="/index.cgi?action=register">Register</a></td></tr><tr><td class="windowbg2" height="100"><center>'+guestNews+'</td></tr><tr><td class="titlebg"><center>'+siteName+'</center></td></tr></table></tr></td></table>')
} else {
if(ttd[2].innerHTML.match(/0 are new/i)){
document.write('<table align="center" width="520" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" width="600"><tr><td class="titlebg"><center>Welcome Center</center></td></tr><tr><td class="windowbg"><center>[ <a href="/index.cgi?action=members">Members</a> ] - [ <a href="/index.cgi?action=viewprofile">Profile</a> ] - [ <a href="/index.cgi?action=logout">Log Out</a> ]</center></td></tr><tr><td class="catbg"><center><< Private Message Center >></center></td></tr><tr><td height="50" class="windowbg2"><center>'+oldPmMessage+'<br /><a href="/index.cgi?action=pm">Check Private Messages</a> | <a href="/index.cgi?action=pmsend">Send a Pm</a> | <a href="/index.cgi?action=pm&view=2">Outbox</a></td></tr><tr><td class="windowbg" height="50"><center>'+memberNews+'</td></tr><tr><td class="titlebg"><center>'+siteName+'</center></td></tr></table></tr></td></table>')
} else {
document.write('<table align="center" width="520" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" width="600"><tr><td class="titlebg"><center>Welcome Center</center></td></tr><tr><td class="windowbg"><center>[ <a href="/index.cgi?action=members">Members</a> ] - [ <a href="/index.cgi?action=viewprofile">Profile</a> ] - [ <a href="/index.cgi?action=logout">Log Out</a> ]</center></td></tr><tr><td class="catbg"><center><< Private Message Center >></center></td></tr><tr><td class="windowbg2" height="50"><center>'+newPmMessage+'<br /><a href="/index.cgi?action=pm">Check Private Messages</a> | <a href="/index.cgi?action=pmsend">Send a Pm</a> | <a href="/index.cgi?action=pm&view=2">Outbox</a></td></tr><tr><td class="windowbg" height="50"><center>'+memberNews+'</td></tr><tr><td class="titlebg"><center>'+siteName+'</center></td></tr></table></tr></td></table>')
}
}
</script>
Edit the variables at the top to what you wish.
Main Headers, or Global Headers.
NOTE: If you are using anything other than
<script>
document.getElementsByTagName('td')[2].style.display='none';
</script>
to remove the PM info this code may not work. Do not use
<script>
document.getElementsByTagName('td')[2].innerHTML=' '
</script>
to remove the info.
/*Pm and welcome table by maddenKING*/
var ttd=document.getElementsByTagName('td');
//edit the messages.
var newPmMessage="You have new private messages.";
var oldPmMessage="You have no new private messages.";
var guestMessage="Welcome, guest.";
//edit the news
var guestNews="Hello, guest. We hope you enjoy our site.";
var memberNews="Welcome, member.";
//edit the site name
var siteName="A Site";
//do not edit below this line
if(ttd[2].innerHTML.match(/guest/i)){
document.write('<table align="center" width="520" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" width="600"><tr><td class="titlebg"><center>Welcome Center</center></td></tr><tr><td class="catbg"><center><< Private Message Center >></center></td></tr><tr><td height="50" class="windowbg"><center>'+guestMessage+'<br /><a href="/index.cgi?action=login">Log In</a> | <a href="/index.cgi?action=register">Register</a></td></tr><tr><td class="windowbg2" height="100"><center>'+guestNews+'</td></tr><tr><td class="titlebg"><center>'+siteName+'</center></td></tr></table></tr></td></table>')
} else {
if(ttd[2].innerHTML.match(/0 are new/i)){
document.write('<table align="center" width="520" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" width="600"><tr><td class="titlebg"><center>Welcome Center</center></td></tr><tr><td class="windowbg"><center>[ <a href="/index.cgi?action=members">Members</a> ] - [ <a href="/index.cgi?action=viewprofile">Profile</a> ] - [ <a href="/index.cgi?action=logout">Log Out</a> ]</center></td></tr><tr><td class="catbg"><center><< Private Message Center >></center></td></tr><tr><td height="50" class="windowbg2"><center>'+oldPmMessage+'<br /><a href="/index.cgi?action=pm">Check Private Messages</a> | <a href="/index.cgi?action=pmsend">Send a Pm</a> | <a href="/index.cgi?action=pm&view=2">Outbox</a></td></tr><tr><td class="windowbg" height="50"><center>'+memberNews+'</td></tr><tr><td class="titlebg"><center>'+siteName+'</center></td></tr></table></tr></td></table>')
} else {
document.write('<table align="center" width="520" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" width="600"><tr><td class="titlebg"><center>Welcome Center</center></td></tr><tr><td class="windowbg"><center>[ <a href="/index.cgi?action=members">Members</a> ] - [ <a href="/index.cgi?action=viewprofile">Profile</a> ] - [ <a href="/index.cgi?action=logout">Log Out</a> ]</center></td></tr><tr><td class="catbg"><center><< Private Message Center >></center></td></tr><tr><td class="windowbg2" height="50"><center>'+newPmMessage+'<br /><a href="/index.cgi?action=pm">Check Private Messages</a> | <a href="/index.cgi?action=pmsend">Send a Pm</a> | <a href="/index.cgi?action=pm&view=2">Outbox</a></td></tr><tr><td class="windowbg" height="50"><center>'+memberNews+'</td></tr><tr><td class="titlebg"><center>'+siteName+'</center></td></tr></table></tr></td></table>')
}
}
</script>
Edit the variables at the top to what you wish.
Main Headers, or Global Headers.
NOTE: If you are using anything other than
<script>
document.getElementsByTagName('td')[2].style.display='none';
</script>
to remove the PM info this code may not work. Do not use
<script>
document.getElementsByTagName('td')[2].innerHTML=' '
</script>
to remove the info.