Plugins can add level menus in Evo (PLUGINS)

Version 1.592


The calls to: CMD_PLUGINS_ADMIN?json=yes CMD_PLUGINS_RESELLER?json=yes CMD_PLUGIN?json=yes will now include an item called: "additional_menus" below each plugin's array, if that plugin created a given menu file.. This will be used to add entire menu sections at the Admin, Reseller and/or User Level menus, say if you want to add many features yourself, instead of just the single URL to your plugin. ================= PLUGIN.CONF To enable a menu for the given level, in the plugin.conf: menu_admin=admin/menu.php menu_reseller=reseller/menu.php menu_user=user/menu.php where you can adjust the path to whatever you'd like. Absence of a menu_* line will prevent it from showing up in the json output. ================= MENU FILE To setup a menu, place it in the matching path from the menu_*= setting. Again, it does not need to be admin/menu.php, it can be whatever you want. /usr/local/directadmin/plugins/PLUG/admin/menu.php /usr/local/directadmin/plugins/PLUG/reseller/menu.php /usr/local/directadmin/plugins/PLUG/user/menu.php ================= JSON OUT example, for the CMD_PLUGINS_ADMIN?json=yes call: { "hello_world": { "additional_menus": "CMD_PLUGINS_ADMIN/hello_world/admin/menu.php", ... } } ================= MENU OUTPUT Should be JSON output, at the moment, please use this formatting so Evo can create it correctly: [ { "name": "Plugged User Menu", "icon": "", "entries": [ { "href": "", "name": "", "icon": "", "newTab": true, "updates": 1 } ] }, { "name": "Second Plugged User Menu", "icon": "", "entries": [ { "href": "", "name": "another menu item", "icon": "", "newTab": true, "updates": 0 }, { "href": "https://localhost:8080", "name": "localhost", "icon": "http://icon.does.not.exist/icon.png", "newTab": false, "updates": 2 } ] } ] ---- T19790

Interested to try DirectAdmin? Get a 30-day Free Trial!