The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
|
Include loadtab.php in Core - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Feature Requests (http://get-simple.info/forums/forumdisplay.php?fid=7) +--- Thread: Include loadtab.php in Core (/showthread.php?tid=2112) |
Include loadtab.php in Core - mvlcek - 2011-09-07 It would be nice, if the loadtab.php (see e.g. in I18N Gallery plugin) could be installed in the admin directory by default. Include loadtab.php in Core - ccagle8 - 2011-09-07 whats the purpose of it? Include loadtab.php in Core - mvlcek - 2011-09-08 It provides the template for displaying the pages on a tab created with the nav-tab action. Basically a load.php, but with actions pluginname-sidebar and pluginname-sidebar-extra and optionally calling a function based on the item parameter instead of the main function specified on register_plugin. Currently plugins (e.g. GSGallery, I18N Gallery) copy this file to the admin folder, if it does not exist. Include loadtab.php in Core - ccagle8 - 2011-09-08 pardon my ignorance, but is nav-tab useless without it? Include loadtab.php in Core - mvlcek - 2011-09-08 ccagle8 Wrote:pardon my ignorance, but is nav-tab useless without it? You could link the navigation tab to a php file in your plugins/your-plugin folder, but
There are some other problems with side menus and nav tabs:
Instead of loadtab.php some small changes will make tabs and side menus (better) usable - see next post. Include loadtab.php in Core - mvlcek - 2011-09-08 OK, here are the suggested changes: plugin_functions.php / createSideMenu: replace it with the following (compatible) code: Code: function createSideMenu($id, $txt, $action=null, $always=true){ Setting $always to false will only show the menu item, if the page is active ($action should be non-empty) plugin_functions.php / createNavTab: Not compatible, but I doubt that anybody uses it. Code: function createNavTab($tabname, $id, $txt, $action=null) { Other parameters like for createSideMenu. To highlight the tab, add the following to the CSS (or rather add the selector to the already existing rule for highlighting): Code: <style type="text/css"> load.php: Replace the <div id="sidebar"> ... </div> code with: Code: <div id="sidebar" > Attached:
It creates side menu items in Pages and Plugins and a new tab. I hope you can include this in 3.1! Martin Include loadtab.php in Core - mvlcek - 2011-10-11 @ccagle8: will this be included in 3.1? Include loadtab.php in Core - ccagle8 - 2011-10-12 it's already in the SVN! Include loadtab.php in Core - mvlcek - 2011-10-12 ccagle8 Wrote:it's already in the SVN!Great. Thanks! Include loadtab.php in Core - leenm - 2011-11-13 Checked this topic because http://get-simple.info/forum/topic/2852/default-function-call-of-plugin-with-loadtabphp/ ccagle8 Wrote:it's already in the SVN! I did a checkout just now, but I can't find the code above in the SVN? Include loadtab.php in Core - n00dles101 - 2011-11-13 Hi leenm, mclvek suggested we either add loadtab.php or make the function changes to plugin_function.php and load.php we have added loadtab.php to the SVN. Mike. Include loadtab.php in Core - leenm - 2011-11-13 n00dles101 Wrote:Hi leenm,That's even better, but how do I create a sidemenu for my plugin then? The createSideMenu function isn't sufficient: Code: unction createSideMenu($id,$txt){ I'd like to have this function working properly. I'm willing to propose improvements, but not if this is working already of course. Maybe I'm not understanding how to use the loadtab functionality with a sidemenu properly? Include loadtab.php in Core - mvlcek - 2011-11-13 n00dles101 Wrote:Hi leenm, Sorry to hear that - I understood that the changes were added, as they provide a much cleaner and better way and allow the plugin developer to easily put his menu items either on an existing tab or a new one. With just the loadtab.php he has to duplicate the actual code for the adding of menu items in each plugin. I definitely encourage you to use the other way in the GetSimple core! Include loadtab.php in Core - leenm - 2011-11-13 Nothing wrong with including loadtab, provided the following changes will be added also: in loadtab.php (line 25), add: Code: # Set default action change function createSideMenu() to Code: function createSideMenu($id,$txt,$pluginid = null){ Only thing left to fix is styling for the active loadtab tab. Include loadtab.php in Core - n00dles101 - 2011-11-13 ok, will have a look at the code and add it to the SVN. Was under the impression it was one or the other. sorry for the confusion... 8) Include loadtab.php in Core - mvlcek - 2011-11-13 n00dles101 Wrote:ok, will have a look at the code and add it to the SVN. Adding loadtab.php was the first approach, but it has a lot of deficiencies, like still needing additional functions for actually adding menu items in the tab. With the changes described here
So above changes are the far better solution than adding loadtab.php. Include loadtab.php in Core - n00dles101 - 2011-12-06 I've updated the latest SVN version with all of these changes. Any chance you could do a quick wiki on how plugin writers should use it ?? Include loadtab.php in Core - mvlcek - 2012-01-23 n00dles101 Wrote:Any chance you could do a quick wiki on how plugin writers should use it ?? Finally done! Include loadtab.php in Core - leenm - 2012-01-24 Why is loadtab.php still included (in SVN)? That file isn't needed with mvlcek's changes, right? Include loadtab.php in Core - n00dles101 - 2012-01-25 @mvlcek, thanks for updating the wiki. I've moved it into its own page for editing; http://get-simple.info/wiki/plugins:tabs_menus |