PDA

View Full Version : Plugin config interface



Roy M. Silvernail
2003-12-03, 17:35
It occurs to me that we could use a configuration interface for plugins, so
the non-techie audience doesn't have to edit plugin modules directly. Here's
what I envision:

Configurable plugins have a 'Configure' button after the plugin name on the
Plugin Setup page of the web interface, which brings up the config form in
that same frame.

An optional config mode to set a (probably reduced) group of configuration
items from the output unit via the remote.

A 'Plugin-Name-Param' namespace is defined in the slimserver.pref file so the
config parameters can be stored centrally.

A getConfig() method on the plugin returns a %hashref of 'Param = Value'
pairs, with Value holding initial defaults or previously set values for web
display.

A setConfig(Param, value) method on the plugin validates and updates a
parameter.

I'd contribute a patch, but I'm just now spelunking the server's web interface
and don't know my way around in there yet. Be happy to take some guidance
off-list and help bring this together, though.

Kevin Deane-Freeman
2003-12-03, 17:42
Quoting "Roy M. Silvernail" <roy (AT) rant-central (DOT) com>:

> It occurs to me that we could use a configuration interface for plugins, so
> the non-techie audience doesn't have to edit plugin modules directly. Here's

There exists one already, if the plugin makes use of it. Robert Moser patched
teh Blackjack plugin a while back to show it off. I've used it with my version
of Email Checker and Forecaster if you want to see where it is now.

> what I envision:
>
> Configurable plugins have a 'Configure' button after the plugin name on the
> Plugin Setup page of the web interface, which brings up the config form in
> that same frame.
No button as yet. Any setups get listed below the plugin list.

>
> An optional config mode to set a (probably reduced) group of configuration
> items from the output unit via the remote.
This is already part and parcel of the plugin menu/function system.

>
> A 'Plugin-Name-Param' namespace is defined in the slimserver.pref file so the
Already in there, suggested naming is PLUGIN.... butit can be anything the
Pligin author wishes to use. It hooks in with the existing setup hashes


> config parameters can be stored centrally.
>
> A getConfig() method on the plugin returns a %hashref of 'Param = Value'
> pairs, with Value holding initial defaults or previously set values for web
> display.
>
> A setConfig(Param, value) method on the plugin validates and updates a
> parameter.
the current setup allows use of Prefs::get, Prefs::clientGet, etc

>
> I'd contribute a patch, but I'm just now spelunking the server's web
> interface
> and don't know my way around in there yet. Be happy to take some guidance
> off-list and help bring this together, though.
There is always room for improvements. :)

-kdf