Post by Nick on Aug 26, 2008 7:42:41 GMT -8
The Top Pm Bar V3 is now here! Some of the new features included from V2 are:
This is a month early, so I hope you enjoy. You can use this or V2. But this one has a few more features, and I fixed a little glitch it would have at random times in V2. Although, I do not reccomend V1 because that has a few minor glitches.
So enough with that, time for the code.
Preview: Click Here
GLOBAL HEADERS!
<style type="text/css">
span
{
font-family: Arial
<--Some popular font families include, 'Verdana', 'Arial', 'Comic Sans MS', 'courier, serif' and a few others that you could google. So if you google 'Font Families', you should find one that you would like.!-->
font-size: 12px
}
</style>
<script>
/*
Top Pm Bar V3
Created by Nick
Special Thanks to Wrighty
This code is copyrighted 2008 by
Fastheart's Coding Corperation
and toppmbarv3.proboards104.com/
*/
var GName = "Guest"
var get = document.getElementsByTagName("TD")
get[2].style.display= "none"
var pb_time = document.getElementsByTagName('td')[2].firstChild.innerHTML.split(/<br\s?\/?>/i)[1];
var guestMessage = '<span><center>Welcome '+GName+', Please <a href=index.cgi?action=login>Login</a> or <a href=index.cgi?action=register>Register</a>. It is currently '+pb_time+'</center></span>'
var pmNew = get[2].innerHTML.split(' are new')[0].split(',')[3]
var memberMessage = '<span><center>Welcome <a href="/index.cgi?action=viewprofile">'+pb_displayname+'</a>, You Have <a href="/index.cgi?action=pm">'+pmNew+' New Message(s)</a>.It is currently '+pb_time+'</center></span>'
var pmBar = document.getElementsByTagName("table")[0].insertRow(0)
var pmCell = pmBar.insertCell(0)
pmCell.className="catbg"
pmCell.innerHTML = memberMessage
if(get[3].innerHTML.match(/Guest/i)){
pmCell.innerHTML = '<center>'+guestMessage+'</center>'
}
</script>
How To Edit:
Change the font in brown to the font that you would like to be displayed. It is set to a default to Arial
Change this variable to how many pixels you want your font to be. It is set to a default of 12 px
The will be the guest name. Whatever you want your guest to be called. Like, Loner for a cat site, Stray for a wolf site, ect.
I hope you enjoy this code. And I give a special thanks to Wrighty for helping me with the time function. V4 will be out this September or so and I am starting the code right now.
THERE IS ONE BUG! if you have a header table or something, anything incased in <center></center>, will be as large as you put your text and whatever font you modified it as. This bug is yet to be fixed.
Fixed, 8-8-08.
- Ability to set font size in pixels
- Ability to set custom font size
- View time in the bar
- Less bugs/glitches
This is a month early, so I hope you enjoy. You can use this or V2. But this one has a few more features, and I fixed a little glitch it would have at random times in V2. Although, I do not reccomend V1 because that has a few minor glitches.
So enough with that, time for the code.
Preview: Click Here
GLOBAL HEADERS!
<style type="text/css">
span
{
font-family: Arial
<--Some popular font families include, 'Verdana', 'Arial', 'Comic Sans MS', 'courier, serif' and a few others that you could google. So if you google 'Font Families', you should find one that you would like.!-->
font-size: 12px
}
</style>
<script>
/*
Top Pm Bar V3
Created by Nick
Special Thanks to Wrighty
This code is copyrighted 2008 by
Fastheart's Coding Corperation
and toppmbarv3.proboards104.com/
*/
var GName = "Guest"
var get = document.getElementsByTagName("TD")
get[2].style.display= "none"
var pb_time = document.getElementsByTagName('td')[2].firstChild.innerHTML.split(/<br\s?\/?>/i)[1];
var guestMessage = '<span><center>Welcome '+GName+', Please <a href=index.cgi?action=login>Login</a> or <a href=index.cgi?action=register>Register</a>. It is currently '+pb_time+'</center></span>'
var pmNew = get[2].innerHTML.split(' are new')[0].split(',')[3]
var memberMessage = '<span><center>Welcome <a href="/index.cgi?action=viewprofile">'+pb_displayname+'</a>, You Have <a href="/index.cgi?action=pm">'+pmNew+' New Message(s)</a>.It is currently '+pb_time+'</center></span>'
var pmBar = document.getElementsByTagName("table")[0].insertRow(0)
var pmCell = pmBar.insertCell(0)
pmCell.className="catbg"
pmCell.innerHTML = memberMessage
if(get[3].innerHTML.match(/Guest/i)){
pmCell.innerHTML = '<center>'+guestMessage+'</center>'
}
</script>
How To Edit:
Change the font in brown to the font that you would like to be displayed. It is set to a default to Arial
Change this variable to how many pixels you want your font to be. It is set to a default of 12 px
The will be the guest name. Whatever you want your guest to be called. Like, Loner for a cat site, Stray for a wolf site, ect.
I hope you enjoy this code. And I give a special thanks to Wrighty for helping me with the time function. V4 will be out this September or so and I am starting the code right now.
Fixed, 8-8-08.