[lUkE]™
Not New Member
[Sj1:0]
Posts: 21
[lUkE]™ said 0 great things
|
Post by [lUkE]™ on Nov 2, 2010 19:08:40 GMT -8
Edit: Bug fixed, now works in all browsers!Name of code: PM bar text in nav-bar Cross Browser? yes Instructions: You don't have to edit this code at all. All you have to do is put it into the global header or main header where ever you want it but it must be in the header. What this will do is, make the nav-bar bigger and add PM text which by default as a guest says, 'Hello Guest Please login or register.' The member will see ' Hello USERNAME 0 New Message(s). 0 Total Message(s)'.. Editable? Only edit if you understand what you are doing, if you want help understanding how it works use the support board. Preview: lukescodetestsite.proboards.com/index.cgi?board=pm Go here and look at the nav-bar (the HOME SEARCH etc part.) Code: <script type="text/javascript"> <!-- //[CB] PM bar text in nav-bar // Made and Copyright Luke - do not repost, claim as own rip etc // [url]codercommunity.proboards.com [/url]
// No editing Required :)
if(pb_username=="Guest"){
var pmtextl = document.getElementsByTagName('td')[5];
pmtextl.innerHTML += '<BR>Hello Guest, please login or register. ';
}
else if(pb_username!="Guest"){
var Message_Font=document.getElementsByTagName('font').item(2).innerHTML; var New_Messages=(Message_Font.match(/<\/a>, (.+?) (is|are) new./i))? RegExp.$1 : ''; var Total_Messages=(Message_Font.match(/>(.+?) message(s)?<\/a>/i))? RegExp.$1 : '';
var pmtext = document.getElementsByTagName('td')[5];
pmtext.innerHTML += '<BR>Hello, '+pb_username+'. '+New_Messages+' New messages. '+Total_Messages+' total messages. ';
} //--> </script> Copyright Information: This is made and copyright to me, Luke. You can not rip, repost or claim as your own. Support: Go here to get support (guests can post in there). Thanks and enjoy using it, if you need help customizing it etc use the link above
|
|