Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-09-06 16:46:36

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

soo_plugin_pref: Plugin preference management

This one is aimed at plugin authors. If you want to provide preference settings for your plugin, but would rather avoid the chore of coding the plugin_prefs and plugin_lifecycle callbacks, soo_plugin_pref provides a simple alternative.

For background, see this thread.

Information and download.

Version 0.2.3 (2017-02-23)

  • Documentation update

Version 0.2.2 (9/28/2009)

  • Fixed bug in preference position re-indexing (determines position in preference setting user interface)

Version 0.2.1 (9/26/2009)

  • Plugin installation order is no longer important: a plugin’s preferences will be installed the first time it is activated or its “Options” link clicked while soo_plugin_pref is active
  • Preferences are now assigned a meaningful position value, so that the order preferences are declared in your plugin is the order they appear in the pref admin

Version 0.2 (9/17/2009)

This version uses a different identifying scheme for preferences and hence is not compatible with the previous version. The plugin name is no longer stored in the event column, so there is no longer any restriction on plugin name length.

Known compatible plugins:

Last edited by jsoo (2017-02-23 19:20:47)


Code is topiary

Offline

#2 2009-09-06 16:52:28

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: soo_plugin_pref: Plugin preference management

More background:

Quoting from the plugin help:

This is currently in the nature of an alpha release. As of version 0.1 there are no publicly-available plugins that are compatible with it, not even my own plugins that have preference settings. I release it now in hopes of furthering discussion of what direction, if any, core Txp will take toward handling plugin preferences; more immediately, to find out if other plugin authors are interested in using it and have any modifications or additional features to suggest.

So:

Are there plans for something like this in core Txp? I mean any kind of generalized system for handling plugin preferences.

Any other plugin authors think this would be useful to them? If so, any suggestions, requests, or comments?


Code is topiary

Offline

#3 2009-09-06 17:44:27

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: soo_plugin_pref: Plugin preference management

And here is an example plugin you can use to quickly check out the admin interface, and how plugin preferences are automatically installed or deleted as the plugin is installed or deleted:

Edit: current version of the example plugin

Note: Install and activate soo_plugin_pref first, then install this one.

Last edited by jsoo (2009-09-29 22:48:38)


Code is topiary

Offline

#4 2009-09-06 18:50:11

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: soo_plugin_pref: Plugin preference management

Very cool idea!

Just a little snag: soo_plugin_prefs requires soo_thumb_atts.

Got a “fatal error” on soo_useless’ pref page when soo_plugin_prefs tried to call soo_thumb_atts_gTxt().

Last edited by jelle (2009-09-06 18:51:03)

Offline

#5 2009-09-06 19:19:10

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: soo_plugin_pref: Plugin preference management

Oops. Corrected version now available at the above link.


Code is topiary

Offline

#6 2009-09-18 14:18:26

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: soo_plugin_pref: Plugin preference management

Version 0.2 just released.

This version uses a different identifying scheme for preferences and hence is not compatible with the previous version. The plugin name is no longer stored in the event column, so there is no longer any restriction on plugin name length. The configuration instructions have been updated to reflect this and to include an alternate configuration if your plugin’s preferences are optional.

Information and download.


Code is topiary

Offline

#7 2009-09-18 18:22:37

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: soo_plugin_pref: Plugin preference management

Nothing to say except than the support of J Soo to TXP community with plugins, docs and
responsiveness to questions is quite impressive.

Offline

#8 2009-09-18 18:56:21

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: soo_plugin_pref: Plugin preference management

Thanks candyman!


Code is topiary

Offline

#9 2009-09-26 14:22:13

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: soo_plugin_pref: Plugin preference management

Version 0.2.1 released. Installation sequence no longer matters — you can install soo_plugin_pref before or after any of the other plugins that use it, and still get automatic preference installation. Easier for end users.

Also, preferences are now assigned a meaningful position value, so that the order you (the plugin author) declare your plugin’s defaults is the order they appear in the prefs admin.


Code is topiary

Offline

#10 2009-09-28 19:59:18

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: soo_plugin_pref: Plugin preference management

Version 0.2.2 released. Minor bug fix: preference position re-indexing when a plugin is enabled.


Code is topiary

Offline

Board footer

Powered by FluxBB