TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,234
  • Total Topics: 21,353
  • Online today: 739
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 542
  • Total: 542

Hide panels in administration area

Started by sessus, May 02, 2007, 12:50:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sessus

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).

Lesmond

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 :) 

sessus

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.

JPDeni

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.

sessus


sessus

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.

IchBin

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.

sessus

Thank you for your pointer. The following worked:

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

This website is proudly hosted on Crocweb Cloud Website Hosting.