Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: weightman - helmikuu 20, 2009, 02:26:27 IP

Otsikko: Re-order main menu tabs?
Kirjoitti: weightman - helmikuu 20, 2009, 02:26:27 IP
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
Otsikko: Re: Re-order main menu tabs?
Kirjoitti: shadow82x - helmikuu 20, 2009, 02:40:04 IP
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. :)
Otsikko: Re: Re-order main menu tabs?
Kirjoitti: weightman - helmikuu 20, 2009, 02:54:53 IP
Thanks. That was indeed very easy. :)
Otsikko: Re: Re-order main menu tabs?
Kirjoitti: KahneFan - maaliskuu 08, 2009, 12:41:44 AP
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.