News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[Help] How to remove Sub-menu.

Started by MrRooD, July 24, 2013, 05:49:52 AM

Previous topic - Next topic

MrRooD

Hi , i need remove sub menu but i dont know how can i do this.
Help.

kat


Acans

If you're talking about the main menu that includes Home, Help, etc. Those drop downs can be removed by editing /Sources/Subs.php, and just removing the the menu item.

For example, the Admin menu sub menus:

'admin' => array(
'title' => $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'featuresettings' => array(
'title' => $txt['modSettings_title'],
'href' => $scripturl . '?action=admin;area=featuresettings',
'show' => allowedTo('admin_forum'),
),
'packages' => array(
'title' => $txt['package'],
'href' => $scripturl . '?action=admin;area=packages',
'show' => allowedTo('admin_forum'),
),
'errorlog' => array(
'title' => $txt['errlog'],
'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
),
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
'is_last' => true,
),
),
),


To remove Features, Package Manager, Error Log and Permissions just remove those blocks of code so you're left with:

'admin' => array(
'title' => $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
),


Alternatively you can use this mod, which I believe lets you delete existing menu items.

If that's not the menu your talking about:

Quote from: K@ on July 24, 2013, 06:17:58 AM
Which sub-menu, exactly?

:)
"The Book of Arantor, 17:3-5
  And I said unto him, thy database query shalt always be sent by the messenger of $smcFunc
  And $smcFunc shall protect you against injections and evil
  And so it came to pass that mysql_query was declared deprecated and even though he says he is not
  dead yet, the time was soon to come to pass when mysql_query shall be gone and no more

kat

You're a brave man for taking the plunge, there, ѕησωbåll! :)

Acans

Some call me the Hero of Skyrim :P Bravely, Courage, all that :P
"The Book of Arantor, 17:3-5
  And I said unto him, thy database query shalt always be sent by the messenger of $smcFunc
  And $smcFunc shall protect you against injections and evil
  And so it came to pass that mysql_query was declared deprecated and even though he says he is not
  dead yet, the time was soon to come to pass when mysql_query shall be gone and no more

kat

Skyrim sounds rude... (OK, my mind's rude)

Acans

Never actually thought about it that way till you said it...

But than again, I can't really say I slayed a dragon last night without people looking at me the wrong way...
"The Book of Arantor, 17:3-5
  And I said unto him, thy database query shalt always be sent by the messenger of $smcFunc
  And $smcFunc shall protect you against injections and evil
  And so it came to pass that mysql_query was declared deprecated and even though he says he is not
  dead yet, the time was soon to come to pass when mysql_query shall be gone and no more

Advertisement: