Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Vanilla's use of Base_GetAppSettingsMenuItems_Handler
Linc
Admin
I wanted to make a dashboard panel for my new app, so I went and grabbed Base_GetAppSettingsMenuItems_Handler from Vanilla's /settings/class.hooks.php file, copied it into my hooks file, and customized it.
After a half hour of slogging through code, I realized Vanilla isn't consistent - there's this little line tucked into the Dashboard's version of that function:
Just an FYI if anyone cares.
public function Base_GetAppSettingsMenuItems_Handler(&$Sender) {...and out came a mis-formatted mess.
$Menu = &$Sender->EventArguments['SideMenu'];
$Menu->AddLink('Directory', T('Hierarchy'), 'directory/settings/hierarchy', 'Directory.Hierarchy.Manage');
$Menu->AddLink('Directory', T('Listings'), 'directory/settings/listings', 'Directory.Listings.Manage');
}
After a half hour of slogging through code, I realized Vanilla isn't consistent - there's this little line tucked into the Dashboard's version of that function:
$Menu->AddItem('Forum', T('Forum Settings'));That means (as far as I can tell) Vanilla has favored-nation status because A) it's the only app that can put its controls somewhere other than the end of the list since the Dashboard reserves its spot and it doesn't have to make the AddItem call in its plugin function (so good luck copying the example - Conversations doesn't have a Dashboard panel).
Just an FYI if anyone cares.
0
Comments
/dashboard/modules/class.sidemenumodule.php around line 203.