Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-02-13 11:45:49

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Plugin preferences tab

Some plugins use a whole extension tab for very little. For example upm_image has a tab for setting “Auto-load JavaScript?”, cnk_section_tree has a tab for “Install/Deinstall”, rss_unlimited_categories for “Select List Size”. (Note that I’m not picking on anybody here, I’ll need to do it one day as well). At the moment they all have their own individual tab under Extensions.

Here’s an idea to maybe reduce the crowding under Extensions. How about a plugin preferences tab that would contain a whole series of plugin settings each with its own “Save” button. I guess the plugins would use some form of callback to insert their bit into the standard tab.

Of course, plugins that require more room could still create their own tabs as they currently do.

Offline

#2 2009-02-13 11:58:27

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

Re: Plugin preferences tab

Nice idea. If the event/step model can be worked out so the save buttons perform as you describe, it’s a winner imo. Or even just one Save button that saves all settings — since you only tend to update one plugin at once, all the other settings will remain the same anyway. Or a save button under/next to each plugin that performs the same save step; really only for convenience to save scrolling to the bottom than any other reason?

I concur the Extensions tab is getting mighty crowded on some installs, and a few of the tabs only have a handful of prefs on them (ign_password_protect for example). Also, mem_self_register could be moved from the bottom of Admin->Advanced Prefs to its own place in Admin->Plugin Prefs. Though I do think the rvm_css pref is nice where it is because it fits with the flow of the page and is related to the other prefs.

I’d use the tab for sure on some of my small-prefs plugins. I wonder how many authors will use a “position” other than 1 when defining the order the prefs appear on the page :-)

Last edited by Bloke (2009-02-13 11:59:17)


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-02-13 12:10:10

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Plugin preferences tab

Interesting.
I would go for just one save button per plugin (similar to Sections tab). Looks less prone to undesired/unnoticed changes/errors.

About the order: I think it will be better to use alphabetical order, similar to the Plugins tab.
And will be nice to have a TOC of anchor links at top, so it’s easy to find out the set of plugin preferences you are looking for.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#4 2009-02-13 12:30:57

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Plugin preferences tab

I agree. Where do you think this ‘plugin preferences tab’ should go?
IMHO it should be under the extensions tab.

Offline

#5 2009-02-13 12:40:08

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: Plugin preferences tab

redbot wrote:

I agree. Where do you think this ‘plugin preferences tab’ should go?
IMHO it should be under the extensions tab.

But if it’s core TXP it can go where it likes? cough..Admin..cough Who said that?

Offline

#6 2009-02-13 12:44:54

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

Re: Plugin preferences tab

redbot wrote:

I agree. Where do you think this ‘plugin preferences tab’ should go?

Like Adi, I was thinking under Preferences as a 3rd entry:

Basic  Advanced  Plugin  Language

(or something – ‘Plugin’ might confuse people)

Last edited by Bloke (2009-02-13 12:46:30)


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

#7 2009-02-13 13:26:20

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Plugin preferences tab

Ah ok, no problem.
I thought to “extensions” just for lazyness, because for sure I’ll forget wich plugins have a tab under “extensions” and wich not.

Last edited by redbot (2009-02-13 13:30:49)

Offline

#8 2009-02-13 21:02:31

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Plugin preferences tab

This would be very nice.

Offline

#9 2009-02-14 07:37:07

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Plugin preferences tab

Shouldn’t this thread be moved to the Plugin developers’ wish list?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#10 2009-02-14 07:46:04

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Plugin preferences tab

Yep.

I actually picture this as a kind of extension of the existing plugins tab (yes, it could be done without actually enabling plugins on the plugins page and be somewhat simple to implement):

You define in your setup file whether your plugin has prefs. Say something like:

$plugin['preferences'] = 'upm_my_plugin'; // _prefs will get appended

Where upm_my_plugin_prefs is a kind of callback function, looks like:

function upm_my_plugin_prefs()
{
 // handle plugin prefs	
}

Then in the plugins tab, next to your plugin is a “Preferences” link. The above would make it link to something like textpattern/index.php?event=plugins&step=preferences&plugin=upm_my_plugin where the above function is called.

Last edited by Mary (2009-02-14 07:51:56)

Offline

#11 2009-02-16 13:56:47

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: Plugin preferences tab

Like so?

Offline

#12 2009-02-16 14:17:43

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Plugin preferences tab

Yeah, like that. :)

Offline

Board footer

Powered by FluxBB