Post by Matt on Jun 13, 2006 16:17:32 GMT -5
Created By: Aaron
Creator's Comments:
Description: Adds a cell to the bottom of the welcome table stating the number of total pms and pms new. When clicked, a list of private message quick-links drops down.
Cross-browser: Yes
Editing: Replace the red with the desired bar height.
Global Header
Creator's Comments:
Description: Adds a cell to the bottom of the welcome table stating the number of total pms and pms new. When clicked, a list of private message quick-links drops down.
Cross-browser: Yes
Editing: Replace the red with the desired bar height.
Global Header
<script type="text/javascript">
<!--
// Dynamic Private Message Bar
var obtainHeight = "23"; // height of bars
var gCell = document.getElementsByTagName("td");
var iTTi;
var nRow = document.getElementsByTagName("table").item(0).insertRow(2);
var nCell = nRow.insertCell(0);
nCell.className = "windowbg"; nCell.height = obtainHeight;
nCell.style.paddingLeft = "5px"; nCell.style.paddingRight = "5px";
nCell.innerHTML = (gCell.item(2).innerHTML.match(/hey, (.+?), you have <.+?>(\d+).+?<\/.+?>, (\d+) (are|is) new/i)) ? "<table border='0' width='100%' height='100%'><tr><td width='85%' height='100%'>Welcome back, " + RegExp.$1 + ". You have " + RegExp.$2 + " messages in your inbox. " + RegExp.$3 + (RegExp.$3 == "1" ? " is new." : " are new.") + "</td><td width='15%' height='100%' align='right' id='userAction'>[<a href='javascript:displayMenu()'>View</a>]</td></tr></table>" : "Welcome Guest. Please <a href='/index.cgi?action=login'>login</a> or <a href='/index.cgi?action=register'>register</a>.";
var nRow_2 = document.getElementsByTagName("table").item(0).insertRow(3);
nRow_2.style.display = "none";
var nCell_2 = nRow_2.insertCell(0);
nCell_2.className = "windowbg"; nCell_2.height = "1"; nCell_2.align = "center";
function concealMenu()
{
nCell_2.innerHTML = "";
if(parseFloat(nCell_2.height) == 1)
{
nRow_2.style.display = "none";
document.getElementById("userAction").innerHTML = "[<a href='javascript:displayMenu()'>View</a>]";
clearTimeout(iTTi);
}
if(parseFloat(nCell_2.height) > 1)
{
nCell_2.height = parseFloat(nCell_2.height) - 1;
iTTi = setTimeout("concealMenu()", 10);
}
}
function displayMenu()
{
nRow_2.style.display = "";
if(parseFloat(nCell_2.height) < obtainHeight)
{
nCell_2.height = parseFloat(nCell_2.height) + 1;
iTTi = setTimeout("displayMenu()", 10);
}
if(parseFloat(nCell_2.height) == obtainHeight)
{
nCell_2.innerHTML = "<a href='/index.cgi?action=pm'>Inbox</a> | <a href='/index.cgi?action=pm&view=2'>Outbox</a> | <a href='/index.cgi?action=pmsend'>Create Message</a> | <a href='/index.cgi?action=pmprefs'>Preferences</a>";
document.getElementById("userAction").innerHTML = "[<a href='javascript:concealMenu()'>Hide</a>]";
clearTimeout(iTTi);
}
}
//-->
</script>