|
Post by Xylish on Apr 2, 2005 16:38:49 GMT -8
Code name: Invision Styled PM bar Description Adds a PM bar underneath the menu bar. Invision styled! The features also include a link to the user's profile, Admin CP link (for admins of course!) and the link for the most recent posts. Guests will also have a extra link to the forgotten password ^_~ Compatibility: Works in Firefox and Internet Explorer Preview: LinkLogin as test, with password test Location: All Headers
<script type="text/javascript"> <!-- /*Invision Styled PM bar by Xylish/Popojoe Helped by Eichi and Infection X (thanks guys!) Please do not post this code without permission from Xylish/Popojoe Visit http://popoweb.proboards19.com for more codes and graphics */
// Edit the classname to fit your custom CSS style for the pmbar var classname = "catbg";
var Detect = document.getElementsByTagName('td');
if(Detect[2].innerHTML.match(/Welcome /i)){ var LoginStatus = "Guest"; }else if(Detect[5].innerHTML.match(/action=admin/i)){
var LoginStatus = "Admin"; var alink = "<a href = 'index.cgi?action=admin'>Admin CP</a> ·"<br>}else{ var LoginStatus = "Member"; }
if(Detect[2].innerHTML.match(/Hey, (.+?),/i)){ var username = RegExp.$1; }
Object = document.getElementsByTagName('td')[5].innerHTML if(Object.match(/username=/)){ Username=RegExp.rightContext.split('"')[0] } else { Username="Guest" }
if(Detect[2].innerHTML.match(/are new/i)){ var pms = Detect[2].innerHTML.split('are new')[0].split(',')[3] }else{ var pms = Detect[2].innerHTML.split('is new')[0].split(',')[3] }
var inviGmenu = "<table width='100%'><tr><td width='50%' align='left'><b>Welcome Guest .:</b> <a href='index.cgi?action=login'>Login</a> | <a href='index.cgi?action=register'>Register</a><b> :.</b></td><td width='50%' align='right'><a href='index.cgi?action=reminder'>Forgotten Password?</a></td></tr></table>";
var inviMmenu = "<table width='100%'><tr><td width='50%' align='left'><b>Logged in as:</b> "+username+" (<a href='index.cgi?action=logout'>Logout</a>)</td><td width='50%' align='right'><a href='index.cgi?action=profile&username="+Username+"'> My Controls</a> · <a href='index.cgi?action=recent'> View New Posts</a> · <a href='/index.cgi?action=im'>New Messages ("+pms+")</a></td></tr></table>";
var inviAmenu = "<table width='100%'><tr><td width='50%' align='left'><b>Logged in as:</b> "+username+" (<a href='index.cgi?action=logout'>Logout</a>)</td><td width='50%' align='right'>"+alink+"<a href='index.cgi?action=profile&username="+Username+"'> My Controls</a> · <a href='index.cgi?action=recent'> View New Posts</a> · <a href='/index.cgi?action=im'>New Messages ("+pms+")</a></td></tr></table>";
var bar = document.getElementsByTagName('table')[3]; var invisionbar = bar.insertRow(bar.rows.length).insertCell(0); invisionbar.className = classname;
if(LoginStatus == "Member"){ invisionbar.innerHTML= inviMmenu ; }else if(LoginStatus == "Admin"){ invisionbar.innerHTML = inviAmenu; }else{ invisionbar.innerHTML= inviGmenu; } //--> </script>
Enjoy! [ftp][/ftp]
Last Edit: Apr 2, 2005 16:45:24 GMT -8 by Xylish
|
|
100%
|
Post by Aaron on Apr 2, 2005 16:43:55 GMT -8
Nice code.
|
|
|
Post by CrAzY_J on Apr 2, 2005 17:15:00 GMT -8
you just keep m comming dont you? nice code
|
|
|
Post by Nomi on Apr 3, 2005 3:37:14 GMT -8
Nice work Xylish
|
|
|
Post by ShadowyOne on Apr 3, 2005 11:02:24 GMT -8
Wow, pretty good.
|
|