|
Post by Kenshin on May 11, 2005 13:23:57 GMT -8
All HeadersI tested it and it works You can move it to the v4 DB when its open <script type="text/javascript"> <!--
/* Text-Style Menubar v1.0 By Kenshin Copyright©Zanmato Design. */
Object = document.getElementsByTagName('TD'); if(Object.item(5).innerHTML.match(/action=admin/i)){ InnerUser = 'Admin' }else if(Object.item(2).innerHTML.match(/Guest/i)){ InnerUser = 'Guest' }else{ InnerUser = 'Member' } if(InnerUser=="Admin"){ Object.item(5).innerHTML = '|-| <a href="index.cgi">Home</a> |-| <a href="http://proboards8.com/help">Help</a> |-| <a href="index.cgi?action=search">Search</a> |-| <a href="index.cgi?action=members">Members</a> |-| <a href="index.cgi?action=viewprofile">User CP</a> |-| <a href="index.cgi?action=admin">Admin CP</a> |-| <a href="index.cgi?action=logout">Logout</a> |-|' }else if(InnerUser=="Guest"){ Object.item(5).innerHTML = '|-| <a href="index.cgi">Home</a> |-| <a href="http://proboards8.com/help">Help</a> |-| <a href="index.cgi?action=login">Login</a> |-| <a href="index.cgi?action=register">Register</a> |-|' }else{ Object.item(5).innerHTML = '|-| <a href="index.cgi">Home</a> |-| <a href="http://proboards8.com/help">Help</a> |-| <a href="index.cgi?action=search">Search</a> |-| <a href="index.cgi?action=members">Members</a> |-| <a href="index.cgi?action=viewprofile">User CP</a> |-| <a href="index.cgi?action=logout">Logout</a> |-|' }
//--> </script>
Last Edit: May 22, 2005 6:18:51 GMT -8 by Aaron
|
|
|
Post by CD on May 11, 2005 13:35:46 GMT -8
PBv4 offers a feature to make the links text automatically. Good code none the less.
|
|
|
Post by Kenshin on May 11, 2005 13:48:26 GMT -8
Well my Code has different Spacers
|
|
|
Post by Marty on May 11, 2005 14:00:44 GMT -8
You might want to hold off on posting codes until the new db is up. Good job, though. Also, you might want to change "All Headers" to "Global Headers", since that's now an option.
Last Edit: May 11, 2005 14:01:39 GMT -8 by Marty
|
|
|
Post by Kenshin on May 11, 2005 17:55:10 GMT -8
Ya thanks for the tip Marty
|
|
|
Post by CrAzY_J on May 11, 2005 18:11:37 GMT -8
Couldve dont it easier without making links for each user. get the url by grabbing 'a' then get the image and regexp the last part so you get (home|searh|login etc), then with the help of loop put it in a html link tag
|
|