vForums Support > Programming & Coding :: Code Requests & Support :: > Move / Menu Reformat

Move / Menu Reformat - Posted By ashkir (ashkir) on 20th Oct 08 at 11:00pm
I would like to move the menu to someplace of my choosing (like I will make a table soon and I want the menu in the table). On top of the move of the menu I'd like each button to be on it's own line also in text.

Like now it is:
Home :: Help :: Search

I'd like it like

+ Home
+ Help
+ Search

Re: Move / Menu Reformat - Posted By Nick (nickb) on 23rd Oct 08 at 5:31am
I will get to this right away. {Smile}

Re: Move / Menu Reformat - Posted By Nick (nickb) on 23rd Oct 08 at 6:36am
Alright I did it how you wanted it to be:
Global Header

Code:
 
  1. <script type="text/javascript">
  2. /*Remove  ::  from Menu
  3. Created By Wrighty
  4. support.virtualforums.co.uk*/
  5.  
  6. var menu = document.getElementById('menu_buttons');
  7.  
  8. menu.innerHTML = menu.innerHTML.replace(new RegExp(" ::","g"),'');
  9. </script>
  10. <script>
  11. /*Remove Select Menu Buttons
  12. Created By Wrighty
  13. Do Not: Rip, Repost or Claim*/
  14.  
  15. var y = get('menu_buttons','id');
  16. var x = y.getElementsByTagName('a');
  17. for(a=0;a<x.length;a++){
  18.     if(x[a].getElementsByTagName('img')[0].alt.match(/(home|help|search|profile|admin|members|logout|login|register)/i)){
  19.         x[a].style.display = 'none';
  20.     }
  21. }
  22. </script>
  23.  
  24. <table border="1" cellspacing="0" cellpadding="0" align="center" vAlign="top">
  25. <tr>
  26. <tr>
  27. <td align="center" class="title1">
  28. <font size="2">
  29. Menu
  30. </font>
  31. </td>
  32. <tr>
  33. </tr>
  34. <td align="center" class="window1">
  35. <font size="2">
  36. <a href="/action/home/">+Home</a>
  37. <a href="/action/help/">+Help</a>
  38. <a href="/action/search/">+Search</a>
  39. <a href="/action/profile/">+Profile</a>
  40. <a href="/action/admin/">+Admin</a>
  41. <a href="/action/members/">+Members</a>
  42. <a href="/action/logout/">+Logout</a>
  43. <a href="/action/login/">+Login</a>
  44. <a href="/action/register/">+Register</a>
  45. </font>
  46. </td>
  47. </table>
 


http://dmtesting.vforums.co.uk

Also if you want to remove the border around the banner area use this:

Global Header
Code:
 
  1. <script>
  2.     get('welcome_table','id').cellSpacing = '0';
  3. </script>
 


Any questions or any other help just ask {Smile}

Re: Move / Menu Reformat - Posted By ashkir (ashkir) on 23rd Oct 08 at 3:19pm
You reminded me of something; Wrighty gave me a code a bit ago to show certain things to certain groups. I'll combine this with the code selection you used. Thanks. ^_^.

Re: Move / Menu Reformat - Posted By Nick (nickb) on 23rd Oct 08 at 5:27pm
Your welcome {Smile} Glad I could help again {Smile}

Seems my coding skills are some what getting better {Grin}

Re: Move / Menu Reformat - Posted By ashkir (ashkir) on 23rd Oct 08 at 5:31pm
Cody was teaching me JS over his summer vacation via snail mail. xD. Too bad he passed away. :[. I still have his old address to the frat he was in. (Cody = california). I should try to learn JS again.

Re: Move / Menu Reformat - Posted By Nick (nickb) on 23rd Oct 08 at 5:40pm
I know who Cody is {Unsure} Yeah it is sad.

I need to learn JS too. I can't seem to have my own Custom PM center {Unsure}

Re: Move / Menu Reformat - Posted By ashkir (ashkir) on 23rd Oct 08 at 8:05pm
Want the code to display different things for members and guests?

Re: Move / Menu Reformat - Posted By Nick (nickb) on 23rd Oct 08 at 8:27pm
Sure PM it to me.