Changing Button Order on the Nav Bar

Started by RL Joneson, April 07, 2008, 11:50:58 AM

Previous topic - Next topic

RL Joneson

Is there a way to move the CALENDAR button on the nav bar to the left, so that its order is preferenced over HELP and SEARCH? I've looked at the Subs.php, and noticed it's placed differently because CALENDAR is a link that can be turned on or off. my subs.php is too big to post, so if you need to see parts of it just let me know. thanks!


Hi RL,

I think the order they appear in 'subs.php' determines the order they appear when rendered on screen.


RL Joneson

Is this true? and if so, what would changing the order of something like the CALENDAR, that is an optional feature do?? Can the CALENDAR script be moved up the chain? and if so what is the entire piece of script that has to be moved? I just find it odd that calendar would come after SEARCH and HELP on the nav bar


I was playing with that button array a few days ago and I recall moving one section and it changed the order. Dunno the exact theory behind it... it just did! So I guess it's a case of trial and error, but I'd make a copy of the file before playing, just in case.

I think the code for the calendar bit is:

'calendar' => array(
'title' => $txt['calendar'],
'href' => $scripturl . '?action=calendar',
'show' => $context['allow_calendar'],
'sub_buttons' => array(
'view' => array(
'title' => $txt['calendar_menu'],
'href' => $scripturl . '?action=calendar',
'show' => allowedTo('calendar_post'),
'post' => array(
'title' => $txt['calendar_post_event'],
'href' => $scripturl . '?action=calendar;sa=post',
'show' => allowedTo('calendar_post'),

But I haven't tried. It's quite easy to see the pattern if you study it a bit.

I suppose the logical order of the menu buttons depends on the exact application, so it's hard for the software writers to get it right for everyone. eg. I personally wouldn't have much use for the calendar feature at the moment, so I'd prefer to see it last.

Now there's an idea for a mod if one doesn't exist. Customisable menu order.



Yes.  It is iterated through a foreach loop... so they are spit out in the order they are in as defined in the array in Subs.php.  So its a matter of moving each block around.
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"

Useful Links:
Online Manual!
How to Help us Help you
Settings Repair Tool

RL Joneson