TinyPortal

Development => Resources => Modules => Topic started by: TaskMaster on July 25, 2008, 07:17:01 PM

Title: Mod help with admin page
Post by: TaskMaster on July 25, 2008, 07:17:01 PM
I have written a few mos to SMF/Tinyportal and two of them have admin pages.  I figured out how to add a menu item to the left side admin menu, and when my settings page is up the admin menu shows.  But, the normal left side menu is also showing to the left of the admin menu.  It does not show up when the stock admin pages are viewed, only when my admin pages are being viewed.  Can someone tell me how I can keep that left side menu from showing when MY admin pages are showing?

Thanks for any help.
Title: Re: Mod help with admin page
Post by: Ken. on July 25, 2008, 07:34:55 PM
We would need to know your versions numbers, so... Please read and follow the Posting Guidelines (http://www.tinyportal.net/index.php?topic=581)

If you are running TP1.x try this:
Admin>Tiny Portal>Panels and Blocks>Panel>Hide panels when in custom actions:>... place the name of your custom action/page in that array to see if that will do what you need.

Title: Re: Mod help with admin page
Post by: TaskMaster on July 25, 2008, 08:11:33 PM
Here are my versions.

SMF version: 1.1.5
TP version: 0.9.8

I am not really looking for a setting within the admin section.  I am wondering what code needs to be within my mod to make the left panel not show up just like it doesn't when other admin settings pages are viewed.

Is there some other file I need to include the name of my admin page in, or is there just a $content variable I need to set?

It isn't that big of a deal, I am just trying to get it so it looks like the other admin pages.
Title: Re: Mod help with admin page
Post by: Ken. on July 25, 2008, 08:39:55 PM
Ah... all the more reason to clearly detail what your needs are.  ;)

I don't have an answer for you but hopefully one of our code specialists will be able to help.
Title: Re: Mod help with admin page
Post by: IchBin on July 25, 2008, 08:55:20 PM
This will hide the left bar.
tp_hidebar('left');
Title: Re: Mod help with admin page
Post by: TaskMaster on July 25, 2008, 10:33:56 PM
I think tp_hidebar() is from the latest version of tp, not 0.9.8.

Thanks though.

Maybe I will upgrade.  I wonder how much of my mods will need to be rewritten...
Title: Re: Mod help with admin page
Post by: bloc on July 26, 2008, 10:56:12 AM
No, it exists on 0.9.8 too. For all panels/bars to close(as done in all of TP admin sections) just use:
tp_hidebars('all');
Title: Re: Mod help with admin page
Post by: TaskMaster on July 27, 2008, 05:38:16 AM
Thanks.

I must have made a mistake last time I tried it, because I got an error.   I just tried again and it works fine now.  Probably mistyped something.