Re: [ADDON] ROAM - Re-Organized Admin Menu
Reply #14 –
Looking at the code looks good!
Without entering too much into details (maybe you are not interested ), you may find interesting this function for where you insert the new menus in the middle of the existing array.
Now just a couple of things because I'm picky and my mind is blowing apart for some code I'm writing, so I need some rest and write anything apart code is a good way to rest.
Instead of integrate_pre_include you may want to try integrate_admin_include (I think the mod works only in the admin area, right?).
Or, alternatively, you could use:
$hook_functions = array(
'integrate_admin_areas' => 'ROAM_Buttons|ADMINDIR/ROAM.subs.php',
'integrate_general_mod_settings' => 'ROAM_Settings|ADMINDIR/ROAM.subs.php',
);
This way the file is loaded only when the hook is used.
Oh, last bit, really a "technicality", for the way the code is organized, it would be better to have the file ROAM.subs.php in SUBSDIR and not ADMINDIR.
There is some documentation (see here), but is not very "clear"... it should be expanded... one day. lol
Though, IIRC the menu is in Admin.controller.php, right? Yeah, then that may work as well.