vForums Support > Programming & Coding :: Code Requests & Support :: > [F] Re-order of menu buttons

[F] Re-order of menu buttons - Posted By Nick (nickb) on 17th Feb 08 at 4:19am
Hi, can some one make a code that can re-order the menu buttons, I want the buttons like how PB has them.

Thanks,
Darkmage

Re: Re-order of menu buttons - Posted By Michael (wrighty) on 17th Feb 08 at 10:50am
What do you mean 'like PB'

Re: Re-order of menu buttons - Posted By Fel!x (felix) on 17th Feb 08 at 11:14am
I believe Members is before Profile on ProBoards, if that's what he means... =/

Re: Re-order of menu buttons - Posted By Ross (admin) on 17th Feb 08 at 11:46am
Why are people obsessed with how other forum providers have them? In case you haven't noticed, we're not like other providers {Wink}

Re: Re-order of menu buttons - Posted By Nick (nickb) on 17th Feb 08 at 7:13pm
I know, but I am so used to PB, that I click on Help, and I am thinking its members, and clicking on members, thinking its profile, its like DOH!! Because when I am trying to get something done quick, and I have to be off a a certain time, I get a bit confused thinking that I am on PB. I guess I can learn {Tongue Out} .

Re: Re-order of menu buttons - Posted By Michael (wrighty) on 17th Feb 08 at 7:38pm
Read them...

that's my advice.

Re: Re-order of menu buttons - Posted By Marc (cr0w) on 17th Feb 08 at 7:44pm
Also, Proboards has "Home" and "Help" right next to each other as well, so I don't see how you're confusing that one. {Unsure}

Re: Re-order of menu buttons - Posted By Nick (nickb) on 17th Feb 08 at 7:53pm
{Tongue Out} I meant profile, and members, only some how Help got into my sentence, I was watching a very interesting show, that caught my attention, the T.V. is about 2 or 3 feet from the computer.

Re: Re-order of menu buttons - Posted By Marc (cr0w) on 17th Feb 08 at 7:57pm
 
{Tongue Out} I meant profile, and members, only some how Help got into my sentence, I was watching a very interesting show, that caught my attention, the T.V. is about 2 or 3 feet from the computer.


That makes sense, I suppose. {Tongue Out}

As for the request, could you post the order that you would like the buttons in, please? {Smile} For both logged out, and logged in, if you don't mind. {Wink}

Re: Re-order of menu buttons - Posted By Nick (nickb) on 17th Feb 08 at 8:08pm
Well, The way PB has theres, is the way I want it.

BTW I know that VF is different the PB, For some reason I want everything on my PB Forum to be exact on VF Forum, and that same goes with the board highlight {Wink}

Re: Re-order of menu buttons - Posted By Marc (cr0w) on 17th Feb 08 at 8:19pm
So:

Home, Help, Search, Members, Profile, [Admin,] Logout

Like that? {Smile}

Re: Re-order of menu buttons - Posted By Nick (nickb) on 17th Feb 08 at 8:39pm
More like this:
Logged in: [Home] [Help] [Search] [Members] [Calendar] [Admin] [Profile] [Logout]

Logged out: [Home] [Help] [Search] [Login] [Register]

Re: Re-order of menu buttons - Posted By Marc (cr0w) on 17th Feb 08 at 8:45pm
 
More like this:
Logged in: [Home] [Help] [Search] [Members] [Calendar] [Admin] [Profile] [Logout]

Logged out: [Home] [Help] [Search] [Login] [Register]


Where should "Calendar" link to, as VF does not have a calendar system in place at the moment? {Unsure}

Re: Re-order of menu buttons - Posted By Nick (nickb) on 18th Feb 08 at 2:45am
keep out the calender {Tongue Out} {Wink}

Re: Re-order of menu buttons - Posted By Marc (cr0w) on 18th Feb 08 at 2:45am
 
keep out the calender {Tongue Out} {Wink}


Will do; I'll try to get this for you within the next hour or so. {Smile}

Re: Re-order of menu buttons - Posted By Nick (nickb) on 18th Feb 08 at 3:07am
Ok thanks Marc.

Re: Re-order of menu buttons - Posted By Marc (cr0w) on 18th Feb 08 at 3:48am
 
Ok thanks Marc.


I figured it would be easier to completely rewrite the menu rather than split each image into an array, then reorder the array.

Anyway, here:

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /* Menu Buttons In PB Order */
  4.  
  5. var menu_buttons = document.getElementById("menu_buttons").getElementsByTagName("font")[0];
  6.  
  7. if(vf_username != "guest" && !menu_buttons.getElementsByTagName('a')[4].href.match('/action/admin')){
  8. menu_buttons.innerHTML = '<a href="/"><img src="http://virtualforums.co.uk/images/home.gif" alt="Home" /></a> :: <a href="http://support.virtualforums.co.uk"><img src="http://virtualforums.co.uk/images/help.gif" alt="Help" /></a> :: <a href="/action/search"><img src="http://virtualforums.co.uk/images/search.gif" alt="Search" /></a> :: <a href="/action/members"><img src="http://virtualforums.co.uk/images/members.gif" alt="Members" /></a> :: <a href="/action/view_profile"><img src="http://virtualforums.co.uk/images/profile.gif" alt="Profile" /></a> :: <a href="/action/logout"><img src="http://virtualforums.co.uk/images/logout.gif" alt="Logout" /></a>';
  9. }
  10. else if(vf_username != "guest" && menu_buttons.getElementsByTagName('a')[4].href.match('/action/admin')){
  11. menu_buttons.innerHTML = '<a href="/"><img src="http://virtualforums.co.uk/images/home.gif" alt="Home" /></a> :: <a href="http://support.virtualforums.co.uk"><img src="http://virtualforums.co.uk/images/help.gif" alt="Help" /></a> :: <a href="/action/search"><img src="http://virtualforums.co.uk/images/search.gif" alt="Search" /></a> :: <a href="/action/members"><img src="http://virtualforums.co.uk/images/members.gif" alt="Members" /></a> :: <a href="/action/admin"><img src="http://virtualforums.co.uk/images/admin.gif" alt="Admin Panel" /></a> :: <a href="/action/view_profile"><img src="http://virtualforums.co.uk/images/profile.gif" alt="Profile" /></a> :: <a href="/action/logout"><img src="http://virtualforums.co.uk/images/logout.gif" alt="Logout" /></a>';
  12. }
  13. //-->
  14. </script>
 


Global Header. {Smile}