Author Topic: Staff and User Menus  (Read 376 times)

Offline shadav

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,543
  • Gender: Female
    • shadav on Facebook
    • leashadav on GitHub
    • Foamy Fanatics :: For All Your Foamy The Squirrel Needs
Staff and User Menus
« on: February 19, 2021, 02:32:58 PM »
Link to Mod

This will add 2 new menu items
Staff Menu
User Menu

it will move the admin and moderator menus into the new Staff Menu
it will move the profile and my messages menus into the new User Menu

this only modifies subs.php, so backup Sources/Subs.php before installing just in case :)
and adds 2 lines to Modifications.english.php and Modifications.english-utf8.php (if you have them)

to translate
Code: [Select]
$txt['staff_menu'] = 'Staff Menu';
$txt['user_menu'] = 'User Menu';

The staff menu will only show to those who have permission to view the moderation center
The user menu will only show to those who have permission to edit their profiles

thanks to vbgamer for bring up a point about the user menu
I had just used if allowed to edit profile then show the menu but should also add if allowed pm to show the menu

so changed the show in to an array
Code: [Select]
'show' => allowedTo(array('allow_edit_profile', 'allow_pm')),this way also if you add other menus into the the user menu you can add it's show setting into the array