Problems "Top-level" plugin - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8) +--- Thread: Problems "Top-level" plugin (/showthread.php?tid=373) |
Problems "Top-level" plugin - yxcvbnm - 2010-03-05 i want to write a small "top-level" plugin (means: i use an additional tab next to the plugins tab in the menu') in the main section of the plugin, i want to use a php file which renders my form. i decided to put that into the admin/plugins/myplugin folder and added the tab with: Code: add_action('nav-tab', 'createNavTab', array(''plugins/myplugin/myplugin.php', 'My Plugin')); the starting code of plugins/myplugin/myplugin.php, but the include of ../../inc/common.php fails. It fails, because include of cookie_functions:121 fails and that cause cookie_functions:9 inc_configuration.php fails). what can i do? Code: <?php Problems "Top-level" plugin - n00dles101 - 2010-03-05 The createNavTab function was created originally for the plugins tab and was not meant for general use as top level nav for plugins. We recommend you use the Sidebar for your plugin configurations Let me think about the other problem... Problems "Top-level" plugin - yxcvbnm - 2010-03-05 1. nav-tab n00dles101 Wrote:The createNavTab function was created originally for the plugins tab and was not meant for general use as top levelhm... then, i've got 2 questions:
2. top-level plugin hm... ok, if i choose to use the plugins the original way (not as top level nav, but as second level sidebar menu item), it seems to work well. Problems "Top-level" plugin - n00dles101 - 2010-03-05 The 'nav-tab' hook was originally put in when we created the hook system. Hooks were inserted all over the system as we wanted to have as many in before version 2 came out. Some like this one will probably never be used, but better to have them in just in case, instead of bringing out new revisions just for a hook. The original build of the plugin system checked to see if any plugins were in the directory and dynamically displayed the Plugin tab using the createNavTab() function, if there were none it wasn't displayed. it was later hardcoded into the Tab bar, so the function was longer required for this purpose, see r71 of the SVN. Most of the hook documentation was written before the change was made... and was left in. |