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.
The developer of the mod have to add in tp_hidebars(); in the source file the mod uses for it's action
Thank you, I'll pass that along! Hopefully it makes more sense to him than it does me ???
Would this work in checking for a TP installation?
if(isset($context['TPortal'])) {
tp_hidebars();
}
You don't need a check if you are putting it in the Sources file. Simply tp_hidebars(); will make the bars disappear.
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.
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 ;)
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.
Why would you have tp_hidebars on a site without TP installed?
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.
My point is, you're checking to see if TP is installed basically in order to use tp_hidebars();. But why would you check it if you're not using TinyPortal? I guess I'm not making sense here, if not just ignore me. :)
I am not, but some of my mod users are.
Had you said that in the first place I would have understood. Thus far, you didn't say you had plans to put it in a mod for distribution.
Yeah, I thought it was clear we were talking about a mod. Sorry.
You have to test if TP is installed, otherwise you'll get a Call to undefined function tp_hidebars() in... error, for those who wants to code a mod ;)