TinyPortal

Development => Support => Topic started by: sessus on May 02, 2007, 12:50:26 AM

Title: Hide panels in administration area
Post by: sessus on May 02, 2007, 12:50:26 AM
Hi,

I am aware of the fact that you can do the following Settings>Panels>Hide panels when in admin area YES

Here my question: What do i need to edit in order to remove panels from admin areas that do not ship with the standart SMF package? (e.g. Gallery, Arcade) At the moment, my admin section for SMF Gallery looks slightly weird (see attached picture).
Title: Re: Hide panels in administration area
Post by: Lesmond on May 02, 2007, 12:55:02 AM
This is something you would be best to take up with the mod developers, unless someone here has come across this before and is willing to help :) 
Title: Re: Hide panels in administration area
Post by: sessus on May 02, 2007, 09:27:20 AM
Their comment was: That is the normal output, please post in the FP forums on how to change TP.
I am not asking for a solution, just for where I could change things.
Title: Re: Hide panels in administration area
Post by: JPDeni on May 02, 2007, 12:38:48 PM
You would have to make the change in Sources/TPortal.php. Basically, you want to check for the action and, if it's the gallery, make a call to tp_hidebars(). There are some examples already in the file that you can follow.
Title: Re: Hide panels in administration area
Post by: sessus on May 02, 2007, 02:09:52 PM
thank you very much
Title: Re: Hide panels in administration area
Post by: sessus on May 05, 2007, 12:26:17 PM
the tp_hidebars() function was already in place, so adding custom actions was very easy.

However, the gallery mod, does not use seperate actions, it rather displays all admin function in the following way: [...]?action=gallery;sa=<actionname>

Would any1 know how to use tp_hidebars() in order to hide panels within the gallery mod?

ps: Tried adding 'gallery', but removed panels from the actual gallery. Also tried 'gallery;sa' but that didnt do anything.
Title: Re: Hide panels in administration area
Post by: IchBin on May 06, 2007, 12:01:24 AM
if (isset($_GET['action'] == 'gallery' &&  isset($_GET['sa']))

This would be a way to check while gallery has 'sa' set in the URL. Then just call the tp_hidebars function for it. I haven' looked at the hidebars function yet or I would post the full code.
Title: Re: Hide panels in administration area
Post by: sessus on May 07, 2007, 12:27:28 AM
Thank you for your pointer. The following worked:

//hide Gallery Panels
if ($context['TPortal']['action']=='gallery' &&  isset($_GET['sa']))
{
tp_hidebars();
}