GetSimple Support Forum
[solved] how add custom nav-tab in admin panel ? - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: [solved] how add custom nav-tab in admin panel ? (/showthread.php?tid=796)



[solved] how add custom nav-tab in admin panel ? - michelino - 2010-06-13

Hi all,

there is same example for adding a custom tab in admin menu ??

Code:
nav-tab
Allow insertion of a new tabbed entry in the navigation bar


i want to add a managment page for edit a guestbook xml file by a plugin

tnx and regards Smile


[solved] how add custom nav-tab in admin panel ? - JWH_Matthew - 2010-06-13

I am sorry I am not really understanding your question, are you wanting to create a new tab at the top of your GetSimple
Administration page or to the right of your GetSimple Administration page?


[solved] how add custom nav-tab in admin panel ? - michelino - 2010-06-13

At the top.

Ex.

default tabs: Edit, File, Theme, Backups, Plugins ...


Now i want write a custom plugin for edit an external xml file, like "Page Editing Mode"
so it becomes: Edit, File, Theme, Backups, Plugins, Edit Xml


This is the mockup:


[solved] how add custom nav-tab in admin panel ? - JWH_Matthew - 2010-06-13

I am not sure what the best way to do this would be, however I do know it has been done by JullianCC. I will explain how she does it.

You will need to add the following code after you have registered your plugin:
Code:
if (file_exists(GSPLUGINPATH.'squareit-loadtab.php'))
{
    //hooks using tab loader
    add_action($thisfile.'-sidebar','sqr_createSideMenu',array($thisfile, $thisfile,'SIDE BAR TAB'));
    add_action($thisfile.'-sidebar','sqr_createSideMenu',array($thisfile,'squareit_admin_add_new_poll','SIDE BAR TAB'));
    add_action('nav-tab','sqr_createNavTab',array($thisfile,'TAB NAME'));
}
else
{
        //hooks not using tab loader
    add_action('plugins-sidebar','createSideMenu',array($thisfile,'TAB NAME'));
}

You will also need to add the attached plugin to plugins/

Let me know if how this works for you!


[solved] how add custom nav-tab in admin panel ? - michelino - 2010-06-13

many tnx Matthew Smile

It works but the script needs loadtab.php in admin dir


[solved] how add custom nav-tab in admin panel ? - juliancc - 2010-06-14

@OWS_Matthew - I'm a he not a she. Smile

@Michelino - Just like OWS_Matthew pointed out. I created a plugin that could aid me in creating tabs in getsimple.
You an anybody is free to download this plugin and bundle it with your own plugins.

Here is the link:
http://www.smooka.com/blog/wp-content/plugins/download-monitor/download.php?id=5

Thanks


[solved] how add custom nav-tab in admin panel ? - michelino - 2010-06-18

juliancc Wrote:@Michelino - Just like OWS_Matthew pointed out. I created a plugin that could aid me in creating tabs in getsimple.
You an anybody is free to download this plugin and bundle it with your own plugins.

Here is the link:
http://www.smooka.com/blog/wp-content/plugins/download-monitor/download.php?id=5

Thanks

many many thanks juliancc, this plugin is very very usefull Smile