Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-06-19 08:23:40

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Setting default tab to one that doesn't exisit (in 4.0.9)

I’ve like my TXP plugin to set the default location of /textpattern/ to a tab that i don’t want appearing in any of the other sections. In 4.0.9 you can set the default tab.

I’m a complete newb to plugin development and PHP. Is there a way to set this field to something like /textpattern/index.php?event=dashboard when the plugin is activated?

Last edited by FireFusion (2009-06-19 08:24:03)

Offline

#2 2009-06-19 08:29:05

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: Setting default tab to one that doesn't exisit (in 4.0.9)

FireFusion

Look in Advanced Prefs: “Default admin tab” :-) Does that list your tab in it?

Incidentally, the only issue with this opton is that it doesn’t check the privs of the logged in user so if somone has no privs for the chosen tab they are greeted with “Restricted Area”. Doesn’t affect you in this case of course!

Suppose I should report this as a possible feature enhancement…?

Last edited by Bloke (2009-06-19 08:29:56)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2009-06-19 09:53:31

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: Setting default tab to one that doesn't exisit (in 4.0.9)

Hi Bloke,

I used your plugin code from the other day to make a new tab…

register_callback('show_dash', 'dashboard');

But I decided i didn’t want it to appear under another tab as i have added it as a top level link to my custom Remora theme; and if it is a sublevel too I get to currently active tab highlights which is confusing for people. So I removed this line.

register_tab("admin", 'dashboard', 'Dashboard');

But now it no longer appears in that tab list in advanced preferences.

Any ideas?

Offline

Board footer

Powered by FluxBB