News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Re-order main menu tabs?

Started by weightman, February 20, 2009, 02:26:27 PM

Previous topic - Next topic

weightman

Where is the code that displays the main menu tabs for the forum? I don't see it in index.template.php and I want to re-order them.

Thanks very much

shadow82x

In Sources/subs.php

Starting with
// All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
if (($buttonData = cache_get_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $cacheTime)) === null || time() - $cacheTime <= $modSettings['settings_updated'])
{
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),


This was changed in SMF2.0 so adding tabs onto multiple themes would be easier. :)
Colin B
Former Spammer, Customize, & Support Team Member

weightman

Thanks. That was indeed very easy. :)

KahneFan

It would be nice if there could be a list associated with this in the admin panel which would allow us to "weight" (1,2,3,4...) the tabs for a quick sort of the list.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Advertisement: