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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,022
  • Total Topics: 21,332
  • Online today: 363
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 378
  • Total: 378

Help with mod and TP in regards to Admin Panel

Started by Lucky13MN, September 10, 2007, 06:04:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lucky13MN

I'm helping to test a mod for SMF 1.1.3 and part of it includes going into the admin panel.

I have 'hide panels' when in the admin panel checked (so the side bars don't show). However when I click on this modification the side panels show up again.

Is there something the developer needs to add to his code so TP knows it's part of the admin section to keep the side panels from displaying, or is there another file that needs to be edited for this to work?

Thank you for any input you can provide.

G6Cad

The developer of the mod have to add in tp_hidebars(); in the source file the mod uses for it's action

Lucky13MN

Thank you, I'll pass that along! Hopefully it makes more sense to him than it does me  ???

rrasco

Would this work in checking for a TP installation?

if(isset($context['TPortal'])) {
        tp_hidebars();
    }

IchBin

You don't need a check if you are putting it in the Sources file. Simply tp_hidebars(); will make the bars disappear.

rrasco

Quote from: IchBinâ,,¢ on September 10, 2007, 11:31:20 PM
You don't need a check if you are putting it in the Sources file. Simply tp_hidebars(); will make the bars disappear.

What about boards that do not have TP installed?  Won't it error out undefined?  This is not a TP only mod.

G6Cad

No it will not, and the best way to find out is to actually test your way through, when you are creating a mod, you have to test it to ;)

rrasco

Quote from: G6 on September 11, 2007, 03:41:13 PM
No it will not, and the best way to find out is to actually test your way through, when you are creating a mod, you have to test it to ;)

Ugh, of course, we are in Alpha testing now, which is how we know of this issue.  It is already working like this on TP and non-TP sites.

IchBin

Why would you have tp_hidebars on a site without TP installed?

rrasco

That is why I wanted to check to see if TP was installed prior to running that function that would not be declared if TP was not installed. 

My mod has two custom admin actions.  Those two actions were not running tp_hidebars so the bars were showing in the ACP on garage actions only.

This website is proudly hosted on Crocweb Cloud Website Hosting.